From: Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics Date: Wed, 24 Mar 2021 08:09:17 +0000 (+0100) Subject: [Archive] Fixed Coverity issue X-Git-Tag: submit/tizen/20210326.074032~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=026eb807af7b44e382bb4180a1323c832759c086;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [Archive] Fixed Coverity issue Issue id: 1218132 [Verification] Code compiles, TCT passrate 100%. Coverity showed no issues: https://analysishub.sec.samsung.net/service/analyses/418348 Change-Id: I5d28891a7b2c3b42237c661474ea88d00e028184 --- diff --git a/src/archive/archive_utils.cc b/src/archive/archive_utils.cc index ec6b564c..f54162be 100644 --- a/src/archive/archive_utils.cc +++ b/src/archive/archive_utils.cc @@ -271,7 +271,7 @@ bool pathTargetsDirectoryOutsideDestination(const std::string& targetEntryPath, std::string normalizedPath = normalizePath(destinationPath, targetEntryPath); - if (!normalizedPath.rfind(destinationPath, 0) == 0) { + if (normalizedPath.rfind(destinationPath, 0) != 0) { LoggerE("Destination outside of allowed directory: %s", normalizedPath.c_str()); return true; }