[Geany-devel] GIO saving made configurable?

Colomban Wendling lists.ban at xxxxx
Sun Jun 19 13:16:12 UTC 2011


Le 19/06/2011 14:41, Lex Trotman a écrit :
>> I think so too.
>> I'm only afraid how to give this choice to the user. This needs to be
>> well documented and probably should go into a normal. not hidden pref
>> and so should be in the preferences dialog.
>>
> 
> Yes, thats a bit of a problem, summarised as one liners we get:
> 
> 1. safe but might change permissions and won't work on windows shares
> from *ix, no backups
> 2. can be unsafe, can be slow, complicated, but should work on all
> mounted filesystems and some urls, can keep the temp file as backup
> backup
> 3. risky, simple, works on all mounted filesystems, no backups

Just tell me -- what's the advantages of 2 over 3 then? OK, it wouldn't
depend on gvfs-fuse.

> [...]
> 
> PS just for info last time I looked Gedit used option 2 but with
> special implementation dependent hacking to make it safe.  Maybe
> stealing that is the best option, then its biggest downside is being
> slow sometimes.

Yes, we could make GIO saving safe (e.g. handle writes failure) by
haking on until #602412 [1] get fixed properly.  This looks kinda ugly,
but would at least provide safe saving, just leaving out the temporary
file on failure.

But it wouldn't address the cases where GIO won't success to properly
write (e.g. the bugs I linked in previous mail).  Maybe it is fixable in
GIO though, so reporting those to them might be a start point -- though
I can't tell whether it's reproducible in recent GIO versions, nor what
kind of problem it is.


Le 19/06/2011 13:42, Enrico Tröger a écrit :
> On Tue, 14 Jun 2011 10:28:00 +1000, Lex wrote:
>> So I would say that all three need to stay, and the choice between >>
GIO and the c library needs to be made a preference not a compile
>> time option.
>
> I think so too.
> I'm only afraid how to give this choice to the user. This needs to be
> well documented and probably should go into a normal. not hidden pref
> and so should be in the preferences dialog.

Agreed. However, I can't see how to present this to the user in a way
she can take a proper decision... In the meantime, I think I can commit
the patch I proposed -- we will still be able to make it a visible pref
later -- nope? Though, maybe it'll make us lazy to do the change... :D


Cheers,
Colomban


[1] https://bugzilla.gnome.org/show_bug.cgi?id=602412



More information about the Devel mailing list