domcrypt icon indicating copy to clipboard operation
domcrypt copied to clipboard

gracefully deal with an empty config file

Open rekado opened this issue 11 years ago • 1 comments

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.

rekado avatar Apr 24 '13 00:04 rekado

I/O is hard! Thanks!

daviddahl avatar Apr 24 '13 01:04 daviddahl