Skip mount if zip path doesn't exist 59/286259/3
authorilho kim <ilho159.kim@samsung.com>
Tue, 3 Jan 2023 02:13:30 +0000 (11:13 +0900)
committerilho kim <ilho159.kim@samsung.com>
Tue, 3 Jan 2023 04:56:31 +0000 (13:56 +0900)
Mount operation fails when there is no zip path
so trying mount is useless operation

Change-Id: I5f9a556b2a770b61a63cffb49cfd491a71670dd7
Signed-off-by: ilho kim <ilho159.kim@samsung.com>
src/common/tzip_interface.cc

index e35e304..26fabf2 100644 (file)
@@ -100,6 +100,11 @@ class TzipInterface::Pimpl {
       bf::remove(mount_path_);
     }
 
+    if (!bf::exists(zip_path)) {
+      LOG(WARNING) << "zip path(" << zip_path << ") doesn't exist!";
+      return false;
+    }
+
     const char* mount_path_str = mount_path_.string().c_str();
     const char* zip_path_str = zip_path_.string().c_str();
     const char* tzip_smack_rule = kTzipSmackRule;