mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
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:
parent
dd2e7962f3
commit
ba9c155837
@ -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;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user