[Geany-devel] GIO saving made configurable?
lists.ban at xxxxx
Mon Jun 20 16:41:02 UTC 2011
Le 20/06/2011 00:49, Lex Trotman a écrit :
>> Just tell me -- what's the advantages of 2 over 3 then? OK, it wouldn't
>> depend on gvfs-fuse.
> Yes, and it is safe (I think) if it keeps the backup file.
True. And it would be safe against write failures with GEdit's hack or
>>> 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  get fixed properly. This looks kinda ugly,
>> but would at least provide safe saving, just leaving out the temporary
>> file on failure.
> My understanding is that the nasty hack in Gedit is to work around this problem.
Yes it is. I also wrote an example a while ago with a similar hack, and
it worked -- will need to check which hack is the best, but still a hack...
>> 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.
> 3220784 doesn't say if safe file saving is set (ie its using type1),
> its the default and doesn't use GIO but no one asked the OP also notes
> gedit works so stealing their hack would work.
Right. Simply using GIO would work without the hack I guess, the hack
just prevents data loss upon write failure.
> 3184594 is using GIO, the temporary file is a GIO name. The question
> is what sort of filesystem does virtual box report the host to the
> guest as, this may confuse GIO.
> 3126535 doesn't say if safe file saving is set (ie its using type1),
> its the default and doesn't use GIO but no one asked the OP
I guess she's using GIO (.goutputstream-KMEUMV is a GIO name), and and
he seems to have the same problem with GEdit.
Looks like the target file was still open ("Text file busy"), so it's
either a GIO problem (failed to detect it needs closing the file on a
Windows share), an OP's problem (she has the file opened on the remote
side) or a sharing problem (whatever).
>> 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
> I agree that it is important enough to add the patch as an interim
> until the UI or some other fix can be worked out.
More information about the Devel