mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-04 20:04:11 +01:00
Reload modified plugin files on :loadplugins.
This commit is contained in:
@@ -1127,10 +1127,11 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
||||
loadplugins = { __proto__: loadplugins, value: args.map(Option.parseRegexp) }
|
||||
|
||||
dir.readDirectory(true).forEach(function (file) {
|
||||
if (file.isFile() && loadplugins.getKey(file.path) && !(!force && file.path in dactyl.pluginFiles)) {
|
||||
if (file.isFile() && loadplugins.getKey(file.path)
|
||||
&& !(!force && file.path in dactyl.pluginFiles && dactyl.pluginFiles[file.path] >= file.lastModifiedTime)) {
|
||||
try {
|
||||
io.source(file.path);
|
||||
dactyl.pluginFiles[file.path] = true;
|
||||
dactyl.pluginFiles[file.path] = file.lastModifiedTime;
|
||||
}
|
||||
catch (e) {
|
||||
dactyl.reportError(e);
|
||||
|
||||
Reference in New Issue
Block a user