electron-userland / electron-json-storage

:package: Easily write and read user settings in Electron apps
1.43k stars 79 forks source link

Lock file gets generated when trying to remove a file by name in storage #132

Closed DylanVerstraete closed 5 years ago

DylanVerstraete commented 5 years ago
Schermafbeelding 2019-06-18 om 11 34 24

This lock file shows up in storage when trying to remove a file by key. This does not always occur. Any suggestions?

jviotti commented 5 years ago

Hey @DylanVerstraete. I think this is safe to ignore. It comes from the lockfile module we're using (https://github.com/npm/lockfile/blob/master/lockfile.js#L224) to ensure safe concurrent I/O on the files.

Are you getting this file when listing by key?

DylanVerstraete commented 5 years ago

@jviotti Yes at that point that file was listed by key.

jviotti commented 5 years ago

Thanks @DylanVerstraete. I have a fix here: https://github.com/electron-userland/electron-json-storage/pull/137 and I'll publish to npm today.

DylanVerstraete commented 5 years ago

Thanks !

jviotti commented 5 years ago

@DylanVerstraete Its v4.1.8 on npm!