Check if widget's shared/res/ entry is directory 52/77852/2 accepted/tizen/common/20160706.141407 accepted/tizen/ivi/20160705.044611 accepted/tizen/mobile/20160705.044443 accepted/tizen/tv/20160705.044553 accepted/tizen/wearable/20160705.044507 submit/tizen/20160704.042542
authorTomasz Iwanek <t.iwanek@samsung.com>
Fri, 1 Jul 2016 09:01:36 +0000 (11:01 +0200)
committerTomasz Iwanek <t.iwanek@samsung.com>
Fri, 1 Jul 2016 11:35:11 +0000 (04:35 -0700)
Installation will succeed if shared/res entry is not directory.

Change-Id: I06e2b3934dd1342ad7ae98fd681a4b2a21d13885

src/wgt/step/filesystem/step_wgt_patch_storage_directories.cc

index 3c5d9e9..fbb8519 100644 (file)
@@ -52,6 +52,10 @@ bool StepWgtPatchStorageDirectories::ShareDirFor3x() {
   bf::path src = context_->pkg_path.get() / kResWgtSubPath / kSharedResLocation;
   if (!bf::exists(src))
     return true;
+  if (!bf::is_directory(src)) {
+    LOG(WARNING) << "Widget's shared/res/ is not directory";
+    return true;
+  }
   bf::path dst = context_->pkg_path.get() / kSharedResLocation;
   if (!common_installer::MoveDir(src, dst,
                                  common_installer::FS_MERGE_DIRECTORIES)) {