mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-29 07:23:32 +02: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) {
|
child: function (name) {
|
||||||
let f = this.constructor(this);
|
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;
|
return f;
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -503,6 +504,8 @@ var File = Class("File", {
|
|||||||
return f.path.substr(f.parent.path.length, 1);
|
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) ({
|
DoesNotExist: function (path, error) ({
|
||||||
path: path,
|
path: path,
|
||||||
exists: function () false,
|
exists: function () false,
|
||||||
|
|||||||
Reference in New Issue
Block a user