diff options
Diffstat (limited to 'src/zenutil/packageformat.cpp')
| -rw-r--r-- | src/zenutil/packageformat.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/zenutil/packageformat.cpp b/src/zenutil/packageformat.cpp index 8087b7564..579e0d13c 100644 --- a/src/zenutil/packageformat.cpp +++ b/src/zenutil/packageformat.cpp @@ -126,7 +126,14 @@ IsLocalRef(tsl::robin_map<void*, std::string>& FileNameMap, if (UseFilePath) { ExtendablePathBuilder<256> LocalRefFile; - LocalRefFile.Append(std::filesystem::absolute(PathFromHandle(Ref.FileHandle))); + std::error_code Ec; + std::filesystem::path FilePath = PathFromHandle(Ref.FileHandle, Ec); + if (Ec) + { + ZEN_WARN("Failed to get path for file handle {} in IsLocalRef check, reason '{}'", Ref.FileHandle, Ec.message()); + return false; + } + LocalRefFile.Append(std::filesystem::absolute(FilePath)); Path8 = LocalRefFile.ToUtf8(); } FileNameMap.insert_or_assign(Ref.FileHandle, Path8); |