1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-13 16:25:45 +01:00

Fix :!foo completion (but not :! foo completion, which works fine).

This commit is contained in:
Kris Maglione
2010-10-18 23:33:42 -04:00
parent b34fe0b741
commit 4ce5925ace
2 changed files with 8 additions and 3 deletions

View File

@@ -282,7 +282,7 @@ const File = Class("File", {
}
catch (e) {
util.reportError(e);
return null;
return File.DoesNotExist(e);
}
}
let self = XPCSafeJSObjectWrapper(file);
@@ -489,6 +489,11 @@ const File = Class("File", {
return this.PATH_SEP = f.path.substr(f.parent.path.length, 1);
},
DoesNotExist: function (error) ({
exists: function () false,
__noSuchMethod__: function () { throw error || Error("Does not exist"); }
}),
defaultEncoding: "UTF-8",
expandPath: function (path, relative) {
@@ -543,7 +548,7 @@ const File = Class("File", {
path.appendRelativePath(this.expandPath(tail, true));
}
catch (e) {
return { exists: function () false, __noSuchMethod__: function () { throw e; } };
return File.DoesNotExist(e);
}
return path;
},