diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/zencore/filesystem.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/zencore/filesystem.cpp b/src/zencore/filesystem.cpp index 6fdea31e1..dda1abb06 100644 --- a/src/zencore/filesystem.cpp +++ b/src/zencore/filesystem.cpp @@ -1062,12 +1062,13 @@ ReadFileRange(void* NativeHandle, uint64_t Offset, uint64_t Size, void* OutData) if (Error) { std::error_code DummyEc; - ZEN_WARN("ReadFile/pread failed (offset {:#x}, size {:#x}) file: '{}' (size {:#x})", + ZEN_WARN("ReadFile/pread failed with {} (offset {:#x}, size {:#x}) file: '{}' (size {:#x})", + Error, Offset, Size, PathFromHandle(NativeHandle, DummyEc), FileSizeFromHandle(NativeHandle)); - throw std::system_error(std::error_code(::GetLastError(), std::system_category()), + throw std::system_error(std::error_code(Error, std::system_category()), fmt::format("ReadFile failed (offset {:#x}, size {:#x}) file: '{}' (size {:#x})", Offset, Size, |