Browse Source

fix: don't try to init mmap on missing asar (#24890)

Shelley Vohr 4 years ago
parent
commit
8311078a96
1 changed files with 1 additions and 1 deletions
  1. 1 1
      shell/common/asar/archive.cc

+ 1 - 1
shell/common/asar/archive.cc

@@ -119,7 +119,7 @@ bool FillFileInfoWithNode(Archive::FileInfo* info,
 
 Archive::Archive(const base::FilePath& path) : path_(path) {
   base::ThreadRestrictions::ScopedAllowIO allow_io;
-  if (!file_.Initialize(path_)) {
+  if (base::PathExists(path_) && !file_.Initialize(path_)) {
     LOG(ERROR) << "Failed to open ASAR archive at '" << path_.value() << "'";
   }
 }