6b4f773052de1d063b1fb729859cdc6736ec8e9a
file_truncate had a stub `return -1` on Windows, causing all chunk_store_write calls to fail (every PUT returned TRANSFER_FAILED). Implement it using SetFilePointer + SetEndOfFile. Add mock_SetEndOfFile and mock_GetFileAttributesA to Quakey so the simulation can exercise the Windows code paths against the mock filesystem. Without these, SetEndOfFile was unmocked (link error) and GetFileAttributesA called the real Win32 API on mock paths, making chunk_store_exists always return false. Verified: seeds 1-100 pass with 2000s simulation time. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Languages
C
98.4%
Shell
1%
Zig
0.4%
Batchfile
0.2%