GNOME Bugzilla – Bug 621917
backups not implemented on ftp backend
Last modified: 2015-02-11 23:22:40 UTC
bluefish uses g_file_replace_async() with backup=TRUE, but on the ftp backend the backup alwais fails. starting GVFS_DEBUG=1 /usr/lib/gvfs/gvfsd reveals: send_reply(0x1ba80c0), failed=0 () backend_dbus_handler org.gtk.vfs.Mount:OpenForWrite Queued new job 0x1c01810 (GVfsJobOpenForWrite) send_reply(0x1c01810), failed=1 (backups not supported yet)
Created attachment 296353 [details] [review] ftp: Implement backups for replace
Review of attachment 296353 [details] [review]: Looks good otherwise... ::: daemon/gvfsbackendftp.c @@ +998,3 @@ + if (!g_vfs_ftp_task_send (&task, + G_VFS_FTP_PASS_550, + "DELE %s", g_vfs_ftp_file_get_ftp_path (backupfile))) I don't like to see those multiline condition statements, wouldn't be better something like: res = g_vfs_ftp_task_send (...) if (!res) { ... @@ +1001,3 @@ + { + g_vfs_ftp_file_free (backupfile); + goto out; I wonder if we should fail with G_IO_ERROR_CANT_CREATE_BACKUP in those cases... @@ +1024,3 @@ + + g_vfs_ftp_dir_cache_purge_file (ftp->dir_cache, file); + g_vfs_ftp_dir_cache_purge_file (ftp->dir_cache, backupfile); g_vfs_ftp_file_free (backupfile);
Created attachment 296548 [details] [review] ftp: Implement backups for replace
Looks good, thanks :-)
Pushed to master as 5620bd8acb05c0a4eb93a792b25c349c5c6efebd. Thanks for the review!