If the path is not exists Remove function should return true
Change-Id: Ib05529a4131d8afaa7ea192064bbfa04d7279db9
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
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) {