summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2012-08-09 21:29:03 +0200
committerCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2012-08-09 22:12:20 +0200
commit8278677d5b8099b82e496830c71f5e00c166811a (patch)
tree7d8df0953d4903a65299cb69217f1cc737fe0912
parent1f35da46568ba5000bbb5426dae415cfa12224f7 (diff)
downloadgvfs-8278677d5b8099b82e496830c71f5e00c166811a.tar.gz
afp: Properly report range lock errors when writing to forks.
-rw-r--r--daemon/gvfsafpvolume.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/daemon/gvfsafpvolume.c b/daemon/gvfsafpvolume.c
index 1a2eac0a..eccaf9c6 100644
--- a/daemon/gvfsafpvolume.c
+++ b/daemon/gvfsafpvolume.c
@@ -2632,7 +2632,7 @@ write_ext_cb (GObject *source_object, GAsyncResult *res, gpointer user_data)
}
res_code = g_vfs_afp_reply_get_result_code (reply);
- if (!(res_code == AFP_RESULT_NO_ERROR || res_code == AFP_RESULT_LOCK_ERR))
+ if (res_code != AFP_RESULT_NO_ERROR)
{
g_object_unref (reply);
@@ -2646,6 +2646,10 @@ write_ext_cb (GObject *source_object, GAsyncResult *res, gpointer user_data)
g_simple_async_result_set_error (simple, G_IO_ERROR, G_IO_ERROR_NO_SPACE,
_("Not enough space on volume"));
break;
+ case AFP_RESULT_LOCK_ERR:
+ g_simple_async_result_set_error (simple, G_IO_ERROR, G_IO_ERROR_FAILED,
+ _("File is locked by another user"));
+ break;
default:
g_simple_async_result_take_error (simple, afp_result_code_to_gerror (res_code));
break;