diff --git a/common/modules/storage.jsm b/common/modules/storage.jsm index 88fb7e52..4af8d929 100644 --- a/common/modules/storage.jsm +++ b/common/modules/storage.jsm @@ -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,