From: Jakub Izydorczyk Date: Fri, 6 Mar 2015 12:12:53 +0000 (+0100) Subject: Remove assert checking for existance of widget package file X-Git-Tag: accepted/tizen/common/20150416.084921~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F88%2F37988%2F3;p=platform%2Fcore%2Fappfw%2Fapp-installers.git Remove assert checking for existance of widget package file Remove assert, which checks if widget package file exsits and replace it with checks from boost lib for file existence and return error on failure. Change-Id: I75dd117d85bef0fe1313da8a2510fe5bd6673dc7 --- diff --git a/src/common/step/step_unzip.cc b/src/common/step/step_unzip.cc index 4f36052..225dddd 100644 --- a/src/common/step/step_unzip.cc +++ b/src/common/step/step_unzip.cc @@ -216,7 +216,11 @@ Step::Status StepUnzip::ExtractToTmpDir(const char* src, Step::Status StepUnzip::process() { assert(!context_->file_path.get().empty()); - assert(!access(context_->file_path.get().c_str(), F_OK)); + if (!boost::filesystem::exists(context_->file_path.get())) { + LOG(ERROR) << "Specified widget does not exist: " + << context_->file_path.get(); + return Step::Status::ERROR; + } bf::path tmp_dir = GenerateTmpDir(context_->root_application_path.get());