Skip to content

Fix FileHandle.resize(0L) on mingwX64 - #1845

Open
czp3009 wants to merge 1 commit into
lysine-dev:mainfrom
czp3009:main
Open

Fix FileHandle.resize(0L) on mingwX64#1845
czp3009 wants to merge 1 commit into
lysine-dev:mainfrom
czp3009:main

Conversation

@czp3009

@czp3009 czp3009 commented Aug 12, 2026

Copy link
Copy Markdown

SetFilePointer() returns the low-order file position, so zero is valid when resizing a file to zero bytes. Treat only INVALID_SET_FILE_POINTER with a non-NO_ERROR last error as failure.

Resolve #1844

`SetFilePointer()` returns the low-order file position, so zero is valid
when resizing a file to zero bytes. Treat only `INVALID_SET_FILE_POINTER`
with a non-`NO_ERROR` last error as failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

FileHandle.resize(0L) throws after successful SetFilePointer on mingwX64

1 participant