From 588e5a998734a0db5f63b05335a883af3014dc8e Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Wed, 27 Jul 2011 05:10:46 -0400 Subject: [PATCH] Reload modified plugin files on :loadplugins. --- common/content/dactyl.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/common/content/dactyl.js b/common/content/dactyl.js index b888c742..56fd7a1f 100644 --- a/common/content/dactyl.js +++ b/common/content/dactyl.js @@ -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);