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.
@czp3009

czp3009 commented Aug 23, 2026

Copy link
Copy Markdown
Author

Is there a project manager who can review and merge my PR? If there are any prerequisites for submitting a PR, please let me know—I couldn’t find any specific requirements on the project website. okio is a great project, but this bug is currently holding me up, and I’d like to start using the fixed version as soon as possible.

@JakeWharton
JakeWharton requested a review from swankjesse August 23, 2026 12:55
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