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

FileSaver does not truncate existing files #1050

Merged
merged 1 commit into from
Mar 2, 2023

Conversation

farmergreg
Copy link
Contributor

Description of Change

FileMode.OpenOrCreate does not automatically truncate files.

This fix truncates files to ensure that junk data does not appear at the end of a newly saved file if the data being written is shorter than data present in a previously existing file.

Linked Issues

FileMode.OpenOrCreate does not automatically truncate files.

This fix truncates files to ensure that junk data does not appear at the
end of a newly saved file if the data being written is shorter than data
present in a previously existing file.
@VladislavAntonyuk VladislavAntonyuk merged commit 30c86b7 into CommunityToolkit:main Mar 2, 2023
@ccmcdaniel
Copy link

I believe this is still an issue unfortunately, as I used it in a project and FileSaver still did not erase what is already in a file. It just overwrote it.

@VladislavAntonyuk
Copy link
Collaborator

@ccmcdaniel it is not released yet

@github-actions github-actions bot locked and limited conversation to collaborators Nov 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] FileSaver Leaves junk data at the end of existing files
3 participants