mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-09 22:05:46 +01:00
Closes issue #302.
--HG-- extra : rebase_source : d472dcfa840b7e82e8834aef5f4c3abdfc4132bd
This commit is contained in:
@@ -327,7 +327,8 @@ var File = Class("File", {
|
||||
*/
|
||||
child: function (name) {
|
||||
let f = this.constructor(this);
|
||||
f.QueryInterface(Ci.nsILocalFile).appendRelativePath(name);
|
||||
for each (let elem in name.split(File.pathSplit))
|
||||
f.append(elem);
|
||||
return f;
|
||||
},
|
||||
|
||||
@@ -503,6 +504,8 @@ var File = Class("File", {
|
||||
return f.path.substr(f.parent.path.length, 1);
|
||||
}),
|
||||
|
||||
pathSplit: Class.memoize(function () util.regexp("(?:/|" + util.regexp.escape(this.PATH_SEP) + ")", "g")),
|
||||
|
||||
DoesNotExist: function (path, error) ({
|
||||
path: path,
|
||||
exists: function () false,
|
||||
|
||||
Reference in New Issue
Block a user