From 0b5a263f2a46483550d0cc00b6fc4ff31dd8bea3 Mon Sep 17 00:00:00 2001 From: Mark Raasveldt Date: Sun, 1 Dec 2019 00:42:56 +0100 Subject: [PATCH] Windows fix --- src/common/file_system.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/file_system.cpp b/src/common/file_system.cpp index 8b0a353dafa..9f9d56817a5 100644 --- a/src/common/file_system.cpp +++ b/src/common/file_system.cpp @@ -410,7 +410,7 @@ int64_t FileSystem::GetFileSize(FileHandle &handle) { void FileSystem::Truncate(FileHandle &handle, int64_t new_size) { HANDLE hFile = ((WindowsFileHandle &)handle).fd; // seek to the location - SetFilePointer(handle, location); + SetFilePointer(handle, new_size); // now set the end of file position if (!SetEndOfFile(hFile)) { auto error = GetLastErrorAsString();