diff --git a/utils/src/b_error/b_excep_utils.cpp b/utils/src/b_error/b_excep_utils.cpp index 09b5bef369b68bc5aa9258c9df8dffd87e6f8b19..5a6ad2f9144af3aab7ee88fa01b613989fcb2901 100644 --- a/utils/src/b_error/b_excep_utils.cpp +++ b/utils/src/b_error/b_excep_utils.cpp @@ -31,7 +31,7 @@ void BExcepUltils::VerifyPath(const string_view &path, bool isExtension) string absPath = ret.c_str(); if (isExtension && absPath.find(string(BConstants::PATH_BUNDLE_BACKUP_HOME) - .append(BConstants::SA_BUNDLE_BACKUP_RESTORE)) != 0) { + .append(BConstants::SA_BUNDLE_BACKUP_RESTORE)) == std::string::npos) { throw BError(BError::Codes::EXT_INVAL_ARG, "Invalid path, not in backup restore path"); } } catch (const rust::Error &e) {