[Github-comments] [geany/geany] Make document_rename_file() return a gboolean; Abort save if rename fails (#1180)

elextr notifications at xxxxx
Fri Aug 19 05:39:24 UTC 2016


The reason that the save should go ahead is because the operation being performed is "Save As".  The rename function is only a secondary convenience function to save deleting the original file.

It is actually a poorly thought out function anyway.  Why rename the existing file if it is about to be overwritten?  And if you have "safe" or "GIO" file saving set the sequence is "rename original file, write new data to a new file, rename it over the just renamed original file" :-P

The "Save As" dialog should offer to "Remove original file after saving".  And delete the original file after saving.  Then its obvious that a failure of removal due to permissions, or any of the reasons given above, has not affected the main function to "Save As".  And on save failure the original file is unharmed.  And on Linux there is no restriction to the same filesystem when selecting the option.

-- 
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/pull/1180#issuecomment-240932680
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160818/9e8053e4/attachment.html>


More information about the Github-comments mailing list