From: Ilho Kim Date: Wed, 12 Aug 2020 04:59:00 +0000 (+0900) Subject: Fix Remove function in file utils X-Git-Tag: accepted/tizen/unified/20200813.122551~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=62a65c1f579310ee36c60e6e5b4ab09705bd917d;p=platform%2Fcore%2Fappfw%2Fapp-installers.git Fix Remove function in file utils If the path is not exists Remove function should return true Change-Id: Ib05529a4131d8afaa7ea192064bbfa04d7279db9 Signed-off-by: Ilho Kim --- diff --git a/src/common/utils/file_util.cc b/src/common/utils/file_util.cc index 3740c82..60295cb 100644 --- a/src/common/utils/file_util.cc +++ b/src/common/utils/file_util.cc @@ -332,15 +332,8 @@ bool RemoveAll(const bf::path& path) { bool Remove(const bf::path& path) { bs::error_code error; - if (!exists(path, error)) { - if (error) { - LOG(ERROR) << "Cannot remove: " << path << ", " << error.message(); - return false; - } - - if (!bf::is_symlink(bf::symlink_status(path, error))) - return true; - } + if (!exists(bf::symlink_status(path, error))) + return true; bf::remove(path, error); if (error) {