From: Tomasz Iwanek Date: Fri, 1 Jul 2016 09:01:36 +0000 (+0200) Subject: Check if widget's shared/res/ entry is directory X-Git-Tag: accepted/tizen/common/20160706.141407^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5957350d379b2307e5b2d33ce2ce90137fe536a0;p=platform%2Fcore%2Fappfw%2Fwgt-backend.git Check if widget's shared/res/ entry is directory Installation will succeed if shared/res entry is not directory. Change-Id: I06e2b3934dd1342ad7ae98fd681a4b2a21d13885 --- diff --git a/src/wgt/step/filesystem/step_wgt_patch_storage_directories.cc b/src/wgt/step/filesystem/step_wgt_patch_storage_directories.cc index 3c5d9e9..fbb8519 100644 --- a/src/wgt/step/filesystem/step_wgt_patch_storage_directories.cc +++ b/src/wgt/step/filesystem/step_wgt_patch_storage_directories.cc @@ -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)) {