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

Fix bug in FileStorage. #36

Merged
merged 2 commits into from
Dec 29, 2020
Merged

Conversation

Gaelan
Copy link
Contributor

@Gaelan Gaelan commented Dec 29, 2020

FileStorage was opening files for writing without turning on truncate, so if the new contents were smaller, we'd leave some of the old file behind, making it invalid JSON.

This PR fixes that, and adds a test.

Closes #35.

FileStorage was opening files for writing without turning on truncate,
so if the new contents were smaller, we'd leave some of the old file
behind, making it invalid JSON.
@Gaelan Gaelan force-pushed the fix_file_storage_bug branch from e0e7c3a to 7ddebf2 Compare December 29, 2020 07:28
Copy link
Owner

@ewilken ewilken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for catching this!

@ewilken ewilken merged commit c4c9a57 into ewilken:master Dec 29, 2020
@ewilken
Copy link
Owner

ewilken commented Dec 29, 2020

v0.1.0-pre.5 with the fix is out on crates.io.

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.

Bug in FileStorage
2 participants