[PATCH] Properly handle GNOME_VFS_XFER_OVERWRITE_MODE_ABORT in xfer operation



The attached patch makes GnomeVFS set the vfs_error to
GNOME_VFS_ERROR_INTERRUPTED instead of GNOME_VFS_ERROR_FILE_EXISTS when
the operation was cancelled.

-- 
Christian Neumair <chris gnome-de org>
Index: libgnomevfs/gnome-vfs-xfer.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-xfer.c,v
retrieving revision 1.130
diff -u -p -r1.130 gnome-vfs-xfer.c
--- libgnomevfs/gnome-vfs-xfer.c	26 Nov 2005 13:39:51 -0000	1.130
+++ libgnomevfs/gnome-vfs-xfer.c	11 Jan 2006 19:55:07 -0000
@@ -337,7 +334,7 @@ handle_overwrite (GnomeVFSResult *result
 	switch (*overwrite_mode) {
 	case GNOME_VFS_XFER_OVERWRITE_MODE_ABORT:
 		*replace = FALSE;
-		*result = GNOME_VFS_ERROR_FILE_EXISTS;
+		*result = GNOME_VFS_ERROR_INTERRUPTED;
 		*skip = FALSE;
 		return FALSE;
 	case GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE:
@@ -357,7 +354,7 @@ handle_overwrite (GnomeVFSResult *result
 		switch (action) {
 		case GNOME_VFS_XFER_OVERWRITE_ACTION_ABORT:
 			*replace = FALSE;
-			*result = GNOME_VFS_ERROR_FILE_EXISTS;
+			*result = GNOME_VFS_ERROR_INTERRUPTED;
 			*skip = FALSE;
 			return FALSE;
 		case GNOME_VFS_XFER_OVERWRITE_ACTION_REPLACE:

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil



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