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

Possibility of corruption of store data on app termination #20

Closed
ghost opened this issue Jul 29, 2016 · 2 comments
Closed

Possibility of corruption of store data on app termination #20

ghost opened this issue Jul 29, 2016 · 2 comments
Labels

Comments

@ghost
Copy link

ghost commented Jul 29, 2016

Hello, I've been using this lib for some time now in my project. However, I found that my stores and data get corrupt at times. Upon examination, I found that data might be corrupted if the app is killed during the converter.write call, resulting in an incomplete write and so a corrupt file. This seems like a critical issue with this lib, IMHO could be solved by writing the data to a randomly named temporary file and then doing a rename-overrite to the key name so that at no point in time the store file is in an invalid state.

@chris-horner
Copy link
Contributor

Totally agree! I'll jump on this next chance I get 😄

@chris-horner
Copy link
Contributor

Fixed in #38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant