aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver
diff options
context:
space:
mode:
authorZousar Shaker <[email protected]>2026-03-18 11:03:52 -0600
committerGitHub Enterprise <[email protected]>2026-03-18 11:03:52 -0600
commit99f1167e2e4937bf581d28b70b45815955636fc4 (patch)
treedf163fcfb67d95470bef1a169e7e7d6882be900f /src/zenserver
parentadd kind positional argument to xmake sln (#857) (diff)
parentAddressing review feedback (diff)
downloadzen-99f1167e2e4937bf581d28b70b45815955636fc4.tar.xz
zen-99f1167e2e4937bf581d28b70b45815955636fc4.zip
Merge pull request #855 from ue-foundation/zs/long-filename-improvement
Zs/long filename improvement
Diffstat (limited to 'src/zenserver')
-rw-r--r--src/zenserver/storage/projectstore/httpprojectstore.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/zenserver/storage/projectstore/httpprojectstore.cpp b/src/zenserver/storage/projectstore/httpprojectstore.cpp
index 38a121b37..425caee97 100644
--- a/src/zenserver/storage/projectstore/httpprojectstore.cpp
+++ b/src/zenserver/storage/projectstore/httpprojectstore.cpp
@@ -3161,8 +3161,10 @@ HttpProjectService::HandleRpcRequest(HttpRouterRequest& Req)
continue;
}
- std::error_code Ec;
- const std::filesystem::path FilePath = std::filesystem::canonical(Project->RootDir / ServerPath, Ec);
+ std::error_code Ec;
+ // Long paths require MakeSafeAbsolutePath otherwise canonical will yield an error code
+ const std::filesystem::path SafeAbsFilePath = MakeSafeAbsolutePath(Project->RootDir / ServerPath);
+ const std::filesystem::path FilePath = std::filesystem::canonical(SafeAbsFilePath, Ec);
if (Ec)
{
@@ -3183,7 +3185,8 @@ HttpProjectService::HandleRpcRequest(HttpRouterRequest& Req)
}
BasicFile DataFile;
- DataFile.Open(FilePath, BasicFile::Mode::kRead, Ec);
+ // Must use SafeAbsFilePath because canonical will have removed leading chars for handling long paths
+ DataFile.Open(SafeAbsFilePath, BasicFile::Mode::kRead, Ec);
if (Ec)
{