You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is related to this particular module (maybe a lower level problem) but I'm experiencing file corruption on iOS.
I'm using fs.write() to replace the whole content of a file as a way to save data.
The function maybe called several times in a short period and no particular "waiting for previous write" mechanism has been implemented.
This is working perfectly well on Android but on iOS I sometime get a corrupted file with the whole content plus part off the content after, like if a write appended part of the data instead of replacing it.
Of course this ends in data corruption as the JSON content cannot be parsed anymore :(
I've tried to fs.remove() the file before fs.write() but fs.remove() sometimes fails (with Error code 1 even if mustExists is false)...
Questions:
Is it safe to call several fs.write() on the same file ?
If not what can I do the work around this problem ?
Thanks a lot,
Julien
The text was updated successfully, but these errors were encountered:
Hi,
Not sure if this is related to this particular module (maybe a lower level problem) but I'm experiencing file corruption on iOS.
I'm using fs.write() to replace the whole content of a file as a way to save data.
The function maybe called several times in a short period and no particular "waiting for previous write" mechanism has been implemented.
This is working perfectly well on Android but on iOS I sometime get a corrupted file with the whole content plus part off the content after, like if a write appended part of the data instead of replacing it.
Of course this ends in data corruption as the JSON content cannot be parsed anymore :(
I've tried to fs.remove() the file before fs.write() but fs.remove() sometimes fails (with Error code 1 even if mustExists is false)...
Questions:
Thanks a lot,
Julien
The text was updated successfully, but these errors were encountered: