On Thu, 4 Nov 2010 20:37:13 +0200 Dimitar Zhekov dimitar.zhekov@gmail.com wrote:
To workaround bug(s) in GVFS, I've now changed the file saving implementation for systems with GIO in SVN trunk. See also:
http://lists.uvena.de/geany-devel/2010-November/003412.html
Please help test this. File permissions should be preserved after saving, and disk space exhaustion should now be handled without losing the previously saved file.
dd if=/dev/zero of=~/zero bs=4K ; File -> Save:
Displays a message "Error writing to file: No space left on device". The file becomes 0 bytes. Reports that the disk file is newer, and offers to reload it. :) The permissions are OK, even for the empty file.
geany 0.20 (built on Nov 4 2010 with GTK 2.20.1, GLib 2.24.2, GIO)
No special options required to activate the new saving or something?..
No, you have the GIO string printed so the implementation will be g_file_replace_contents.
So it seems that function doesn't handle disk exhaustion safely. (But this is no worse than before for Geany).
Perhaps you might like to file a bug against GIO. Perhaps first use gdb to break on that function just to be absolutely sure.
Also, if the argument for backups is set perhaps disk exhaustion is handled: http://library.gnome.org/devel/gio/2.25/GFile.html#g-file-replace-contents
Nick