diff --git a/utils/utils_fs.cpp b/utils/utils_fs.cpp index 93a9dbeb32e6c8ec6e7d60250ada3978aa68c64b..28e154330c5a02c818d5653d90f0db3be6d27d9d 100644 --- a/utils/utils_fs.cpp +++ b/utils/utils_fs.cpp @@ -100,8 +100,8 @@ int64_t GetFilesFromDirectory(const std::string &path, std::vector bool RemoveDir(const std::string &path) { - if (path.empty()) { - LOG(ERROR) << "input path is empty."; + if (path.empty() || path == "/") { + LOG(ERROR) << "input path is invalid."; return false; } std::string strPath = path;