From 77a6d84f02617b0a19bb0c5d838f91f7a20eb264 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Mon, 21 Mar 2022 14:44:48 +0100 Subject: linux fixes --- zenstore/basicfile.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'zenstore/basicfile.cpp') 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(); -- cgit v1.2.3