summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--daemon/gvfsbackendftp.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/daemon/gvfsbackendftp.c b/daemon/gvfsbackendftp.c
index fd940df7..181b19fd 100644
--- a/daemon/gvfsbackendftp.c
+++ b/daemon/gvfsbackendftp.c
@@ -1336,10 +1336,24 @@ do_move (GVfsBackend *backend,
if (flags & G_FILE_COPY_BACKUP)
{
/* FIXME: implement? */
- g_set_error_literal (&task.error,
- G_IO_ERROR,
- G_IO_ERROR_CANT_CREATE_BACKUP,
- _("backups not supported yet"));
+
+ if (flags & G_FILE_COPY_NO_FALLBACK_FOR_MOVE)
+ {
+ g_set_error_literal (&task.error,
+ G_IO_ERROR,
+ G_IO_ERROR_CANT_CREATE_BACKUP,
+ _("Backups not supported"));
+ }
+ else
+ {
+ /* Return G_IO_ERROR_NOT_SUPPORTED instead of G_IO_ERROR_CANT_CREATE_BACKUP
+ * to be proceeded with copy and delete fallback (see g_file_move). */
+ g_set_error_literal (&task.error,
+ G_IO_ERROR,
+ G_IO_ERROR_NOT_SUPPORTED,
+ "Operation not supported");
+ }
+
g_vfs_ftp_task_done (&task);
return;
}