Skip to content

OPEN_ALWAYS -> CREATE_ALWAYS in nob_fd_open_for_write#41

Closed
twixuss wants to merge 1 commit intotsoding:mainfrom
twixuss:main
Closed

OPEN_ALWAYS -> CREATE_ALWAYS in nob_fd_open_for_write#41
twixuss wants to merge 1 commit intotsoding:mainfrom
twixuss:main

Conversation

@twixuss
Copy link
Contributor

@twixuss twixuss commented Mar 17, 2025

nob_fd_open_for_write behaviour on windows

With OPEN_ALWAYS it would not clear the contents, leaving garbage data if new file size is less than old size. Replaced with CREATE_ALWAYS so it will clear the file before writing.

Now `nob_fd_open_for_write` will clear the file before writing.
With OPEN_ALWAYS it would not clear the contents, leaving garbage data if new file size is less than old size.
@rexim
Copy link
Member

rexim commented Mar 24, 2025

Thank you! Committed at 3948f33

@rexim rexim closed this Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants