[Github-comments] [geany/geany] Possible Data Loss if a file save fails during close (#1147)

elextr notifications at xxxxx
Sat Jul 23 14:05:15 UTC 2016


Found by inspection, needs to be checked.

Both the plain C file IO and GIO (g_file_replace_contents) can leave the original file damaged if a failure occurs during a write.  The normal advice is to "don't panic, you still have the buffer contents to save somewhere else", but if the save fails during a close Geany will still close, so now both the original file and the buffer are lost.

Basically `libmain.c` in `main_quit` should not ignore the return from `document_close_all()`.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1147
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160723/cb9963f4/attachment.html>


More information about the Github-comments mailing list