[Github-comments] [geany] cant edit files over network (#921)

Colomban Wendling notifications at xxxxx
Mon Mar 7 11:02:22 UTC 2016


> but using a known buggy GIO

https://bugzilla.gnome.org/show_bug.cgi?id=602412  Added to @elextr's thesis for reference.  This is the real annoyance here, because we *know* it fails miserably in that case.

However, I'm not really sure it's actually worse than plain write, as the only disadvantage over it would be speed on *some* scenarios.  The `use_atomic_file_saving` (`g_file_set_contents()`) has other safety advantages, but is too problematic on losing permissions.
So maybe it'd be good enough to only keep the default way, and really use it to it's full potential.  Yet IIRC we had issues with this, and a comment in the code says:

> It is best in most GVFS setups but don't seem to work correctly on some more complex setups (saving from some VM to their host, over some SMB shares, etc.)

So we'd still have to be careful.

But I generally agree with you that we'd be happier with a single saving method using GIO, which is supposed to handle all the boring details for us.  Unfortunately, it's not as pretty as that…

However, maybe we could implement a halfway solution in the meantime, using the full GIO potential when using `g_file_replace_contents()` (the default), and fallback to failing on non-local mounts if another method is selected.  I'm not quite sure of what code changes that would mean, but that might be possible and the least "dangerous" option (e.g. keep all the complexity we have for all weird cases, yet default to fully supporting GFVS).

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/921#issuecomment-193205790
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160307/cfc408cf/attachment.html>


More information about the Github-comments mailing list