flxzt / rnote

Sketch and take handwritten notes.
https://rnote.flxzt.net
GNU General Public License v3.0
6.44k stars 216 forks source link

More resilient file saving by a two-stage file save process #1128

Open flxzt opened 6 days ago

flxzt commented 6 days ago

As mentioned in #1096 it would be very nice to improve the save logic by first saving to a temporary second file and overwriting the first when writing the file actually succeeded.

Right now we are directly overwriting the file, which can corrupt files when the app exits unexpectedly while saving.

RayJW commented 6 days ago

While the discussion is already at it, how exactly are the files overwritten? From a security standpoint, overwriting can be a risk by making deleted data recoverable (see aCropalypse). Not sure how relevant that is, but I don't know the use case for Rnote of all people.