electron-json-storage icon indicating copy to clipboard operation
electron-json-storage copied to clipboard

getall

Open jgarza9788 opened this issue 8 years ago • 1 comments

get all is not releasing the file lock after it's used

jgarza9788 avatar Oct 08 '17 18:10 jgarza9788

Can you better explain what you observed? .getAll() doesn't use any lock mechanism (see https://github.com/electron-userland/electron-json-storage/blob/master/lib/storage.js#L210). The only function that performs locking is .set() (see https://github.com/electron-userland/electron-json-storage/blob/master/lib/storage.js#L272), but the lock is released after fs.writeFile completes, even if an error happened.

jviotti avatar Oct 10 '17 09:10 jviotti