[Geany-devel] Changed file saving implementation for systems with GIO
lists.ban at xxxxx
Sat Nov 6 13:24:17 UTC 2010
Le 06/11/2010 13:45, Dimitar Zhekov a écrit :
> On Sat, 6 Nov 2010 21:31:31 +1100
> Lex Trotman <elextr at gmail.com> wrote:
>> On 6 November 2010 20:33, Dimitar Zhekov <dimitar.zhekov at gmail.com> wrote:
>>> If not anything else, we should use non-buffered I/O, with fsync(), and
>>> check the result of close() anyway.
> Attached. I also rearranged the code a bit to restore the safe saving
> support for Geany compiled with GIO. Since g_file_replace_contents() is
> unsafe, there would be no harm have the old safe saving, at least until
> we resolve the matter.
If I read the patch correctly, it seems not to be against the latest SVN
rev, and lacks the g_object_unref(fp) call in the GIO part ;)
Otherwise, seems good IMHO -- not tested yet though.
More information about the Devel