[Geany-devel] Planning bugfix release 0.20.1

Lex Trotman elextr at xxxxx
Thu May 5 00:46:14 UTC 2011


On 5 May 2011 08:32, Colomban Wendling <lists.ban at herbesfolles.org> wrote:
> Le 04/05/2011 22:53, Enrico Tröger a écrit :
>> Hi,
>>
>> I'd say let's make a 0.20.1 bugfix release soon.
>> So we can release the fixes made since the 0.20 release for users.
>
> Have you some particular fixes in mind? Just curious ^^
>
> BTW, I'm not sure it's really important or our very concern, but it
> seems 0.20 has some weird problems when saving to a Windows machine from
> a Linux one (or whatever, I haven't investigated the problem), probably
> due to use of g_file_replace_contents() (which has other advantages...).
> A few links:
>
> https://sourceforge.net/tracker/?func=detail&aid=3184594&group_id=153444&atid=787791
> https://sourceforge.net/tracker/?func=detail&aid=3126535&group_id=153444&atid=787791
>

Yes its in GIO.  I remember looking at the source when we were trying
to figure out safer file saving without taking forever.  in it there
is:

#ifdef G_OS_WIN32
close file rename file
#else
rename file
#endif

because windows can't rename a file thats open, the error that both
are getting.  The test is the *host* os but in the two cases above GIO
was built for unix and the file was on windows so the test is wrong so
it fails.

Unfortunately i you switch to using safe file saving
g_file_set_contents has a similar error because windows can't rename
over an existing file, so on windows the old file must be deleted
first, but again the decision is based on the host not the target.
(you can tell replace_contents or set_contents by the temp file name,
replace has "outputstream" in it, set has the original file name)

You have to build Geany without GIO so it uses our unsafe code not
replace_contents, I thought there was an option, but I can't find it.

Cheers
Lex



More information about the Devel mailing list