summaryrefslogtreecommitdiff
path: root/client/gvfsfusedaemon.c
diff options
context:
space:
mode:
authorRok Mandeljc <rok.mandeljc@gmail.com>2014-08-09 22:26:28 +0200
committerRoss Lagerwall <rosslagerwall@gmail.com>2014-08-09 23:13:51 +0100
commit4341cf2b36e408c3598bc533d9510ff6ff5b0f84 (patch)
treecf4cdc3c3c364ff2e8fd3e5e314ae6a3cfee9f0f /client/gvfsfusedaemon.c
parentbe4d7fa3b44a8c195bf6e19cf2a44ff9440ffc07 (diff)
downloadgvfs-4341cf2b36e408c3598bc533d9510ff6ff5b0f84.tar.gz
fuse: Add GError to errno mappings for G_IO_ERROR_WOULD_RECURSE and G_IO_ERROR_WOULD_MERGE
This patch adds the following GError to errno mappings to errno_from_error(): G_IO_ERROR_WOULD_RECURSE -> EXDEV G_IO_ERROR_WOULD_MERGE -> ENOTEMPTY The first mapping is required to allow 'mv' to rename/move a directory in a gvfs-fuse directory that belongs to a backend without support for a native move operation. In such cases, g_file_move() returns G_IO_ERROR_WOULD_RECURSE, which needs to be mapped to -EXDEV in order for mv to fall back to recursive copy & delete operation. Similarly, G_IO_ERROR_WOULD_MERGE is returned when trying to move/merge two non-empty directories. By mapping it to -ENOTEMPTY, the error message returned by 'mv' becomes ": Directory not empty" instead of generic ": Input/output error". https://bugzilla.gnome.org/show_bug.cgi?id=734568 Signed-off-by: Rok Mandeljc <rok.mandeljc@gmail.com>
Diffstat (limited to 'client/gvfsfusedaemon.c')
-rw-r--r--client/gvfsfusedaemon.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/client/gvfsfusedaemon.c b/client/gvfsfusedaemon.c
index 82e7c309..12bcebb3 100644
--- a/client/gvfsfusedaemon.c
+++ b/client/gvfsfusedaemon.c
@@ -163,6 +163,8 @@ errno_from_error (GError *error)
{ G_IO_ERROR_TIMED_OUT, EIO },
{ G_IO_ERROR_BUSY, EBUSY },
{ G_IO_ERROR_WOULD_BLOCK, EAGAIN },
+ { G_IO_ERROR_WOULD_RECURSE, EXDEV },
+ { G_IO_ERROR_WOULD_MERGE, ENOTEMPTY },
{ -1, -1 }
};