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();