fix codecheck

Signed-off-by: wuchunbo <wuchunbo1@huawei.com>
This commit is contained in:
wuchunbo
2022-04-22 21:55:53 +08:00
parent 231cd55bf5
commit b27f631300
@@ -178,7 +178,7 @@ DownloadTask::DownloadOption DownloadManager::ParseOption(napi_env env, napi_val
bool DownloadManager::IsPathValid(const std::string &dir, const std::string &filename)
{
auto filepath = dir + '/' + filename;
char path[PATH_MAX];
char path[PATH_MAX + 1];
if (realpath(filepath.c_str(), path) && !strncmp(path, dir.c_str(), dir.length())) {
return true;
}