Do not print warning for FILE_ERROR_NOT_FOUND
authorCheng Zhao <zcbenz@gmail.com>
Sat, 30 Jan 2016 12:48:07 +0000 (20:48 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sat, 30 Jan 2016 12:49:35 +0000 (20:49 +0800)
Close #4282.

atom/common/asar/archive.cc

index 37ff0f4..3545141 100644 (file)
@@ -140,7 +140,10 @@ Archive::~Archive() {
 
 bool Archive::Init() {
   if (!file_.IsValid()) {
-    LOG(ERROR) << base::File::ErrorToString(file_.error_details());
+    if (file_.error_details() != base::File::FILE_ERROR_NOT_FOUND) {
+      LOG(WARNING) << "Opening " << path_.value()
+                   << ": " << base::File::ErrorToString(file_.error_details());
+    }
     return false;
   }