Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OPEN_ALWAYS -> CREATE_ALWAYS in nob_fd_open_for_write #41

Closed
wants to merge 1 commit into from

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