1
0
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:
Kris Maglione
2011-07-27 05:10:46 -04:00
parent 969cdfc5dc
commit 588e5a9987

View File

@@ -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);