summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Lagerwall <rosslagerwall@gmail.com>2014-09-28 09:29:55 +0100
committerRoss Lagerwall <rosslagerwall@gmail.com>2014-10-17 20:35:16 +0100
commit2e765449decfd7ec7668fbba92e6256f19ebdbfd (patch)
tree3be54c7520cca8da24c896ec7baa97cf0f3092e7
parentea347458a314ef1d99ed845b514f33b8af374ad7 (diff)
downloadgvfs-2e765449decfd7ec7668fbba92e6256f19ebdbfd.tar.gz
client: Check for G_FILE_COPY_NO_FALLBACK_FOR_MOVE when push/pulling
Fail if G_FILE_COPY_NO_FALLBACK_FOR_MOVE is specified and either a pull or a push is going to be executed. https://bugzilla.gnome.org/show_bug.cgi?id=737510
-rw-r--r--client/gdaemonfile.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/client/gdaemonfile.c b/client/gdaemonfile.c
index c3f82843..571da1ed 100644
--- a/client/gdaemonfile.c
+++ b/client/gdaemonfile.c
@@ -2823,6 +2823,14 @@ file_transfer (GFile *source,
return FALSE;
}
+ if (!native_transfer && remove_source &&
+ (flags & G_FILE_COPY_NO_FALLBACK_FOR_MOVE))
+ {
+ g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+ _("Operation not supported"));
+ return FALSE;
+ }
+
if (!native_transfer && local_path == NULL)
{
/* This will cause the fallback code to be involved */