59 bytes, text/x-review-board-request
There are a few cases where this method is still used with unnecessary I/O: http://searchfox.org/mozilla-central/search?q=FileUtils.getFile&path= Bug 920187 is on file to migrate the callers, but for the moment we can get an easy win by optimizing the function. Looking at the production code above, there shouldn't be cases where the directory doesn't exist if we're not asking for a subdirectory. I've looked at the callers of FileUtils.getDir also, but they seem to be generally well-behaved: http://searchfox.org/mozilla-central/search?q=FileUtils.getDir&path= I'll start a tryserver build to see if any of the test code relies on the creation of the base directory.
Comment on attachment 8898716 [details] Bug 1391576 - Stop doing main-thread I/O in FileUtils.getFile for the most common case. https://reviewboard.mozilla.org/r/170122/#review175396 r=me if tests still pass.
Attachment #8898716 - Flags: review?(kmaglione+bmo) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/c5f62e5b5655 Stop doing main-thread I/O in FileUtils.getFile for the most common case. r=kmag
You need to log in before you can comment on or make changes to this bug.