Skip to content

Fix #81#93

Merged
bitfield merged 2 commits intomasterfrom
fix_truncate_bug_81
Jan 1, 2022
Merged

Fix #81#93
bitfield merged 2 commits intomasterfrom
fix_truncate_bug_81

Conversation

@bitfield
Copy link
Owner

WriteFile is supposed to truncate and overwrite an existing file. In fact, it was overwriting the beginning of the file with the new data, but leaving the remaining old data intact. Adding the O_TRUNC flag to os.OpenFile fixes this.

WriteFile is supposed to truncate and overwrite an existing file. In fact, it was overwriting the beginning of the file with the new data, but leaving the remaining old data intact. Adding the O_TRUNC flag to os.OpenFile fixes this.
@bitfield bitfield merged commit 24bffd5 into master Jan 1, 2022
@bitfield bitfield deleted the fix_truncate_bug_81 branch January 1, 2022 12:41
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.

1 participant

Comments