diff --git a/utils/src/file_helper.cpp b/utils/src/file_helper.cpp index 75fc1ebfc10920c73b1e4e567028a93d35c554c7..43ed4c2c410f920ece786c5e2daeb153d6df6837 100644 --- a/utils/src/file_helper.cpp +++ b/utils/src/file_helper.cpp @@ -33,7 +33,7 @@ bool CheckFilePathValid(const std::string &path, const std::string &baseRealPath return false; } return (realPath.size() > baseRealPath.size()) && - (baseRealPath.compare(realPath.substr(0, baseRealPath.size())) == 0); + (realPath.compare(0, baseRealPath.size(), baseRealPath) == 0); } } }