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

gracefully deal with an empty config file #5

Open
rekado opened this issue Apr 24, 2013 · 1 comment
Open

gracefully deal with an empty config file #5

rekado opened this issue Apr 24, 2013 · 1 comment

Comments

@rekado
Copy link
Contributor

rekado commented Apr 24, 2013

When an error occurs during the very first initialisation of DOMCrypt, the config file .mozCipher.json may be created as an empty file. On subsequent initialisations of the extension, DOMCrypt will then fail to parse the empty contents, results in a failure to initialise.

Instead of attempting to parse empty contents, DOMCrypt should treat an empty config file as if it didn't exist and overwrite it.

@daviddahl
Copy link
Owner

I/O is hard! Thanks!

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

No branches or pull requests

2 participants