[gvfs] client: Check for G_FILE_COPY_NO_FALLBACK_FOR_MOVE when push/pulling
- From: Ross Lagerwall <rossl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] client: Check for G_FILE_COPY_NO_FALLBACK_FOR_MOVE when push/pulling
- Date: Fri, 17 Oct 2014 19:39:46 +0000 (UTC)
commit 2e765449decfd7ec7668fbba92e6256f19ebdbfd
Author: Ross Lagerwall <rosslagerwall gmail com>
Date: Sun Sep 28 09:29:55 2014 +0100
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
client/gdaemonfile.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/client/gdaemonfile.c b/client/gdaemonfile.c
index c3f8284..571da1e 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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]