GNOME Bugzilla – Bug 727852
Improve the ftp backend's cache mechanism
Last modified: 2014-04-19 06:42:35 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.
Which gedit version is this about?
Version 3.10.4
gedit does check this, so it sounds like a bug in the gvfs ftp backend
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.
(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.
Closing as a duplicate of the gvfs-wide caching mechanism. *** This bug has been marked as a duplicate of bug 728375 ***