[Geany-devel] Changed file saving implementation for systems with GIO

Lex Trotman elextr at xxxxx
Sun Nov 14 21:57:51 UTC 2010

On 11 November 2010 00:27, Nick Treleaven <nick.treleaven at btinternet.com> wrote:
> On Wed, 10 Nov 2010 10:13:29 +1100
> Lex Trotman <elextr at 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.

Attached is a patch to actually make the backup :-)

> Nick
> _______________________________________________
> Geany-devel mailing list
> Geany-devel at uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: unsafe_save_backup.patch
Type: text/x-patch
Size: 2126 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20101115/87d4ee07/attachment.bin>

More information about the Devel mailing list