mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 06:07:59 +01:00
Fix issue in revision 2505a62b7c53. Closes issue #175.
This commit is contained in:
@@ -89,11 +89,12 @@ function Dactyl() {
|
||||
this.HELP_TAGS = {};
|
||||
this.FILE_MAP = {};
|
||||
this.OVERLAY_MAP = {};
|
||||
this.addonID = this.name + "@dactyl.googlecode.com";
|
||||
|
||||
this.pages = {};
|
||||
for each (let pref in ["appName", "fileExt", "host", "hostbin", "idName", "name"])
|
||||
this[pref] = prefs.getComplexValue(pref, Ci.nsISupportsString).data;
|
||||
|
||||
this.addonID = this.name + "@dactyl.googlecode.com";
|
||||
}
|
||||
Dactyl.prototype = {
|
||||
contractID: "@mozilla.org/network/protocol;1?name=dactyl",
|
||||
|
||||
@@ -1096,17 +1096,16 @@ const Dactyl = Module("dactyl", {
|
||||
let save = ["forceNewTab", "forceNewWindow"];
|
||||
let saved = save.map(function (p) dactyl[p]);
|
||||
return function wrappedCallback() {
|
||||
let vals = save.map(function (p) dactyl[p]);
|
||||
let args = arguments;
|
||||
return dactyl.withSavedValues(save, function () {
|
||||
saved.forEach(function (p, i) dactyl[save[i]] = p);
|
||||
try {
|
||||
return callback.apply(self, arguments);
|
||||
return callback.apply(self, args);
|
||||
}
|
||||
catch (e) {
|
||||
dactyl.reportError(e, true);
|
||||
}
|
||||
finally {
|
||||
vals.forEach(function (p, i) dactyl[save[i]] = p);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1546,7 +1545,7 @@ const Dactyl = Module("dactyl", {
|
||||
else if (file.isReadable() && file.isFile())
|
||||
AddonManager.getInstallForFile(file, install, "application/x-xpinstall");
|
||||
else if (file.isDirectory())
|
||||
dactyl.echomsg("Cannot install a directory: " + file.path.quote(), 0);
|
||||
dactyl.echoerr("Cannot install a directory: " + file.path.quote());
|
||||
else
|
||||
dactyl.echoerr("E484: Can't open file " + file.path);
|
||||
}, {
|
||||
|
||||
Reference in New Issue
Block a user