mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 08:15:31 +00:00
Bug 1165861 - Tidy up OSFile error handling in LoopRoomsCache. r=mikedeboer
This commit is contained in:
parent
07a54c9775
commit
da7b1af0b6
@ -81,9 +81,7 @@ LoopRoomsCache.prototype = {
|
||||
try {
|
||||
return (this._cache = yield CommonUtils.readJSON(this.path));
|
||||
} catch(error) {
|
||||
// This is really complex due to OSFile's error handling, see bug 1160109.
|
||||
if ((OS.Constants.libc && error.unixErrno != OS.Constants.libc.ENOENT) ||
|
||||
(OS.Constants.Win && error.winLastError != OS.Constants.Win.ERROR_FILE_NOT_FOUND)) {
|
||||
if (!error.becauseNoSuchFile) {
|
||||
MozLoopService.log.debug("Error reading the cache:", error);
|
||||
}
|
||||
return (this._cache = {});
|
||||
|
Loading…
Reference in New Issue
Block a user