Bug 1391576 - Stop doing main-thread I/O in FileUtils.getFile for the most common case. r=kmag

MozReview-Commit-ID: HybmKdeReeX

--HG--
extra : rebase_source : 1f109e213db36797105471236b8389acc28b1478
This commit is contained in:
Paolo Amadini 2017-08-18 11:12:34 +01:00
parent dd2e7962f3
commit ba9c155837

View File

@ -36,10 +36,11 @@ this.FileUtils = {
* leaf name of a file.
* @return nsIFile object for the file specified. The file is NOT created
* if it does not exist, however all required directories along
* the way are.
* the way are if pathArray has more than one item.
*/
getFile: function FileUtils_getFile(key, pathArray, followLinks) {
var file = this.getDir(key, pathArray.slice(0, -1), true, followLinks);
var file = this.getDir(key, pathArray.slice(0, -1), pathArray.length > 1,
followLinks);
file.append(pathArray[pathArray.length - 1]);
return file;
},