When I use storage inside renderer process to write data on unload event. It works about 50% of the time, another outcome is that it produces file that looks like this data.json.2866685502.
When renamed without numbers the data inside is intact. On app restart the data obviously won't load. It looks like something locks the file and I have no idea what could cause that. storage is not used anywhere else except the code below.
Am I implementing it the right way ? What can cause the file to be locked?
I'm new to electron and distributed software so I apologize if that's something obvious :)
When I use
storage
inside renderer process to write data onunload
event. It works about 50% of the time, another outcome is that it produces file that looks like thisdata.json.2866685502
.When renamed without numbers the data inside is intact. On app restart the data obviously won't load. It looks like something locks the file and I have no idea what could cause that.
storage
is not used anywhere else except the code below.Am I implementing it the right way ? What can cause the file to be locked? I'm new to electron and distributed software so I apologize if that's something obvious :)
renderer.js
downloadData class methods:
I'm on win10, electron-json-storage version 4.1.6