[gvfs] afp: print errors for some more results from FPExchangeFiles



commit 5037b20bc4f6b051812a7576fbbe245421cf55a3
Author: Carl-Anton Ingmarsson <ca ingmarsson gmail com>
Date:   Mon Aug 15 00:32:17 2011 +0200

    afp: print errors for some more results from FPExchangeFiles

 daemon/gvfsafpconnection.h |    1 +
 daemon/gvfsbackendafp.c    |    8 ++++++++
 2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gvfsafpconnection.h b/daemon/gvfsafpconnection.h
index cabfa89..62f1aaa 100644
--- a/daemon/gvfsafpconnection.h
+++ b/daemon/gvfsafpconnection.h
@@ -233,6 +233,7 @@ typedef enum
   AFP_RESULT_DIR_NOT_FOUND        = -5029,
   AFP_RESULT_VOL_LOCKED           = -5031,
   AFP_RESULT_OBJECT_LOCKED        = -5032,
+  AFP_RESULT_ID_NOT_FOUND         = -5034,
   AFP_RESULT_PWD_EXPIRED_ERR      = -5042,
   AFP_RESULT_INSIDE_SHARE_ERR     = -5043,
   AFP_RESULT_INSIDE_TRASH_ERR     = -5044,
diff --git a/daemon/gvfsbackendafp.c b/daemon/gvfsbackendafp.c
index bd0ca0f..fb112e9 100644
--- a/daemon/gvfsbackendafp.c
+++ b/daemon/gvfsbackendafp.c
@@ -2199,6 +2199,14 @@ close_replace_exchange_files_cb (GObject *source_object, GAsyncResult *res, gpoi
         g_vfs_job_failed_literal (G_VFS_JOB (job), G_IO_ERROR, G_IO_ERROR_FAILED,
                                   _("Permission denied"));
         break;
+      case AFP_RESULT_ID_NOT_FOUND:
+        g_vfs_job_failed_literal (G_VFS_JOB (job), G_IO_ERROR, G_IO_ERROR_NOT_FOUND,
+                                  _("File doesn't exist"));
+        break;
+      case AFP_RESULT_OBJECT_TYPE_ERR:
+        g_vfs_job_failed_literal (G_VFS_JOB (job), G_IO_ERROR, G_IO_ERROR_IS_DIRECTORY,
+                                  _("File is a directory"));
+        break;   
       default:
         g_vfs_job_failed (G_VFS_JOB (job), G_IO_ERROR, G_IO_ERROR_FAILED,
                           _("Got error code: %d from server"), res_code);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]