diff options
| author | Dan Engelbrecht <[email protected]> | 2022-03-21 14:44:48 +0100 |
|---|---|---|
| committer | Dan Engelbrecht <[email protected]> | 2022-03-31 11:28:33 +0200 |
| commit | 77a6d84f02617b0a19bb0c5d838f91f7a20eb264 (patch) | |
| tree | d1c99ef9a74a1551eaa06157f12884ee9d7073eb /zenstore/basicfile.cpp | |
| parent | clang-format (diff) | |
| download | zen-77a6d84f02617b0a19bb0c5d838f91f7a20eb264.tar.xz zen-77a6d84f02617b0a19bb0c5d838f91f7a20eb264.zip | |
linux fixes
Diffstat (limited to 'zenstore/basicfile.cpp')
| -rw-r--r-- | zenstore/basicfile.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zenstore/basicfile.cpp b/zenstore/basicfile.cpp index efa91f107..7d5b659c9 100644 --- a/zenstore/basicfile.cpp +++ b/zenstore/basicfile.cpp @@ -289,10 +289,10 @@ BasicFile::SetFileSize(uint64_t FileSize) ::SetEndOfFile(m_FileHandle); #elif ZEN_PLATFORM_MAC int Fd = int(intptr_t(m_FileHandle)); - ftruncate(fileno(Fd), (off_t)FileSize); + ftruncate(Fd, (off_t)FileSize); #else int Fd = int(intptr_t(m_FileHandle)); - ftruncate64(fileno(Fd), (off64_t)FileSize); + ftruncate64(Fd, (off64_t)FileSize); #endif } @@ -309,7 +309,7 @@ BasicFile::MarkAsDeleteOnClose(std::error_code& Ec) Ec = MakeErrorCodeFromLastError(); } #elif ZEN_PLATFORM_LINUX || ZEN_PLATFORM_MAC - std::filesystem::path SourcePath = PathFromHandle(FileRef.FileHandle); + std::filesystem::path SourcePath = PathFromHandle(m_FileHandle); if (unlink(SourcePath.c_str()) < 0) { int UnlinkError = zen::GetLastError(); |