Remix.run Logo
▲ SoftTalker 4 hours ago

Application should call sync() or equivalent and get a positive result before reporting to the user that the file was saved. If the OS hasn't actually written the bits to disk yet, or the disk controller has cached them but not written them, not much the application can do.

But all of that is beside the point. What I said was that the application should do something sane if the cached data is missing or corrupt. Not that it should never lose data; that's impossible for any app to guarantee.