Closed devxbasit closed 2 days ago
Unfortunately it reads like the file hasn't finished saving when you closed the app.
We should definitely fix this by blocking closing the app while a save is in progress.
If there is really important content on it, you could try recovering it through a gzip-recovery tool because the save file is just a gzip archive which contains json data. If it is possible to recover the partially written document then it might be possible to append missing data to it to be able to import it again.
I think I just had this happen to me, though I don't think there's much to recover as all it's left is an empty file :(
Looks like it truncates the file before saving, it'd be a lot safer to write all to a separate file, and then move the file over the original file (LibreOffice seems to do it this way)
That way if something fails all that gets lost is the latest changes, not the whole file (and you could also autosave into this file)
I just pushed a fix that inhibits closing windows containing tabs where saves are currently in progress. This should fix the issue, will be included in the next release
Looks like it truncates the file before saving, it'd be a lot safer to write all to a separate file, and then move the file over the original file (LibreOffice seems to do it this way)
That's another improvement we should implement.
with 4586ee10572fd9fd73fc51fc1ee5e5878cc99197 and the subsequent commits the app close is inhibited while saves are in progress.
For the improvement to save to a second file I'll open another issue.
Describe the bug I get the below error when I try to open a file. I'm not sure, but yesterday after pressing the [CTRL+ S] to save the file, I quickly closed the app. Any way to recover the file back it contains my study notes. Thank you for this awesome app, it is so helpful.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Console Output
Run the app in the terminal with
flatpak --env=RUST_LOG=rnote=debug --env=RUST_BACKTRACE=1 run com.github.flxzt.rnote
and post the output.Screenshots
Desktop (please complete the following information):![image](https://github.com/flxzt/rnote/assets/24441401/e59af690-1c7d-4c91-99da-83424a5ef2f5)
Xubuntu
Additional context