Bug 1388266 - Ignore error about non-existing _locale and localization directory draft
authorRob Wu <rob@robwu.nl>
Thu, 07 Sep 2017 17:55:28 +0200
changeset 661319 7b605ceb12b283a6bdd0c876bd687910564e3289
parent 660738 37b95547f0d27565452136d16b2df2857be840f6
child 730526 192aa06b61a9ca46f7ebaa4e41ee4a7d69acd769
push id78709
push userbmo:rob@robwu.nl
push dateFri, 08 Sep 2017 08:55:09 +0000
bugs1388266
milestone57.0a1
Bug 1388266 - Ignore error about non-existing _locale and localization directory MozReview-Commit-ID: 8wEBUG7bjJD
toolkit/components/extensions/Extension.jsm
--- a/toolkit/components/extensions/Extension.jsm
+++ b/toolkit/components/extensions/Extension.jsm
@@ -389,17 +389,19 @@ this.ExtensionData = class {
 
       try {
         await iter.forEach(entry => {
           results.push(entry);
         });
       } catch (e) {
         // Always return a list, even if the directory does not exist (or is
         // not a directory) for symmetry with the ZipReader behavior.
-        Cu.reportError(e);
+        if (!e.becauseNoSuchFile) {
+          Cu.reportError(e);
+        }
       }
       iter.close();
 
       return results;
     }
 
     let uri = this.rootURI.QueryInterface(Ci.nsIJARURI);
     let file = uri.JARFile.QueryInterface(Ci.nsIFileURL).file;