From 5957350d379b2307e5b2d33ce2ce90137fe536a0 Mon Sep 17 00:00:00 2001 From: Tomasz Iwanek Date: Fri, 1 Jul 2016 11:01:36 +0200 Subject: [PATCH] Check if widget's shared/res/ entry is directory Installation will succeed if shared/res entry is not directory. Change-Id: I06e2b3934dd1342ad7ae98fd681a4b2a21d13885 --- src/wgt/step/filesystem/step_wgt_patch_storage_directories.cc | 4 ++++ 1 file changed, 4 insertions(+) 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)) { -- 2.7.4