-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Pre-Existing output file is not truncated when overwritten #255
Comments
flemminglau
changed the title
Existing output file is not truncated when overwritten
Pre-Existing output file is not truncated when overwritten
Aug 11, 2022
Aha, that is why I am seeing this problem with corrupted json files. thanks. easily fixed in my use-case. |
Nice to see there already is a fix in the pipeline. We have run into the same issue :) |
This was referenced May 18, 2024
Closed
mtsfoni
pushed a commit
that referenced
this issue
May 21, 2024
See also here: https://stackoverflow.com/questions/3653132/file-openwrite-appends-instead-of-wiping-contents Closes: #255 Closes: #329 --------- Signed-off-by: andreas hilti <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In a merge operation in case the output file already exists and is thereby overwritten the previous content is not first truncated.
The result is that in case the new file content is shorter than the old file content the remaining part of the old file is left behind at the end of the new file.
The expectation would be that an existing output file is completely removed when overwritten.
The text was updated successfully, but these errors were encountered: