超长路径json文件解析适配

Signed-off-by: fangyunzhong <fangyunzhong2@huawei.com>
This commit is contained in:
fangyunzhong
2023-04-20 09:14:22 +00:00
parent d03e8c4932
commit 035a4bac2f
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -360,15 +360,15 @@ void FileEntry::FilePath::Init()
}
}
#ifdef _WIN32
string FileEntry::AdapateLongPath(const string &path)
{
#ifdef _WIN32
if (path.size() >= MAX_PATH -12) { //the max file path can not exceed 260 - 12
return LONG_PATH_HEAD + path;
}
#endif
return path;
}
#endif
}
}
}