After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 727852 - Improve the ftp backend's cache mechanism
Improve the ftp backend's cache mechanism
Status: RESOLVED DUPLICATE of bug 728375
Product: gvfs
Classification: Core
Component: ftp backend
1.18.x
Other All
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2014-04-08 17:48 UTC by Victor Porton
Modified: 2014-04-19 06:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Victor Porton 2014-04-08 17:48:14 UTC
When I save a file through FTP, it is silently overridden. Instead, when saving a file through FTP, GEdit should check file modification time and ask a confirmation if the file has changed after it was opened in GEdit.
Comment 1 André Klapper 2014-04-09 09:45:48 UTC
Which gedit version is this about?
Comment 2 Victor Porton 2014-04-09 10:53:12 UTC
Version 3.10.4
Comment 3 Paolo Borelli 2014-04-12 08:49:16 UTC
gedit does check this, so it sounds like a bug in the gvfs ftp backend
Comment 4 Ross Lagerwall 2014-04-12 12:21:53 UTC
The problem here is that gvfs caches info retrieved from the ftp server.
When saving a file, gedit checks the mtime but gvfs returns the cached one, not the updated one.

This is visible if the file is changed outside of the gvfs ftp backend.  If you change the file through the ftp backend, then the cache is kept in sync and gedit correctly detects a change.

Eg:
Open ftp://file through gedit
Run gvfs-save ftp://file and change the file's contents.
Then try change and save the file in gedit and it will correctly detect that the file has been changed.


Any situation where you cache stuff on the client side you end up with the possibility of stale results.  We could try to be smarter about the cache, though.

Ideally, we could have a gvfs-wide caching mechanism rather than a per-backend mechanism.
Comment 5 Ondrej Holy 2014-04-16 21:34:10 UTC
(In reply to comment #4)
> Ideally, we could have a gvfs-wide caching mechanism rather than a per-backend
> mechanism.

I've just filed bug about the caching, see Bug 728375.
Comment 6 Ross Lagerwall 2014-04-19 06:42:35 UTC
Closing as a duplicate of the gvfs-wide caching mechanism.

*** This bug has been marked as a duplicate of bug 728375 ***