diff options
Diffstat (limited to 'src/zenserver')
| -rw-r--r-- | src/zenserver/storage/projectstore/httpprojectstore.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/zenserver/storage/projectstore/httpprojectstore.cpp b/src/zenserver/storage/projectstore/httpprojectstore.cpp index 10207a388..86b4d7100 100644 --- a/src/zenserver/storage/projectstore/httpprojectstore.cpp +++ b/src/zenserver/storage/projectstore/httpprojectstore.cpp @@ -2900,14 +2900,17 @@ HttpProjectService::HandleRpcRequest(HttpRouterRequest& Req) if (DataHash == IoHash::Zero) { - std::string_view ServerPath = View["serverpath"sv].AsString(); - std::error_code Ec; - std::filesystem::path FilePath = Project->RootDir / ServerPath; - if (!CanonicalRoot.empty()) + std::string_view ServerPath = View["serverpath"sv].AsString(); + if (CanonicalRoot.empty()) { - FilePath = std::filesystem::canonical(FilePath, Ec); + ZEN_WARN("Attempting to load file '{}' from project with unset project root", ServerPath); + AllOk = false; + continue; } + std::error_code Ec; + const std::filesystem::path FilePath = std::filesystem::canonical(Project->RootDir / ServerPath, Ec); + if (Ec) { ZEN_WARN("Failed to find file '{}' in project root '{}' for 'snapshot'. Reason: '{}'", |