On 11 November 2010 00:27, Nick Treleaven nick.treleaven@btinternet.com wrote:
On Wed, 10 Nov 2010 10:13:29 +1100 Lex Trotman elextr@gmail.com wrote:
Also, g_file_replace_contents does have a make_backup argument we could provide an option for. This might handle the disk exhaustion problem.
To summarise the long thread for you Nick, g_file_replace_contents and g_file_replace can't be used because there is NO WAY to stop g_stream_close doing the rename of the temp file over the old file even if the write to the temp file fails. So you can get a broken output file.
I know. But at the least the user has the backup file then.
But Geany doesn't make a backup, make_backup is hard coded to false. Needs to be set to true.
Or maybe it needs a hidden pref make_backup_when_using_unsafe_GIO_file_saving :-)
Cheers Lex
Nick _______________________________________________ Geany-devel mailing list Geany-devel@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel