Index: modules/ftp-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/ftp-method.c,v
retrieving revision 1.121
diff -u -p -r1.121 ftp-method.c
--- modules/ftp-method.c	11 Jan 2006 11:43:06 -0000	1.121
+++ modules/ftp-method.c	20 Mar 2006 11:57:37 -0000
@@ -45,6 +45,7 @@
 #include <libgnomevfs/gnome-vfs-module-callback-module-api.h>
 #include <libgnomevfs/gnome-vfs-module.h>
 #include <libgnomevfs/gnome-vfs-module-shared.h>
+#include <libgnomevfs/gnome-vfs-ops.h>
 #include <libgnomevfs/gnome-vfs-parse-ls.h>
 #include <libgnomevfs/gnome-vfs-utils.h>
 #include <stdio.h> /* for sscanf */
@@ -2700,6 +2706,9 @@ do_make_directory (GnomeVFSMethod *metho
 		do_path_command_completely (chmod_command, uri, context,
 			GNOME_VFS_ERROR_ACCESS_DENIED);
 		g_free(chmod_command);
+	} else if (result != GNOME_VFS_ERROR_CANCELLED &&
+		   gnome_vfs_uri_exists (uri)) {
+		result = GNOME_VFS_ERROR_FILE_EXISTS;
 	}
 
 	return result;
Index: modules/sftp-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/sftp-method.c,v
retrieving revision 1.40
diff -u -p -r1.40 sftp-method.c
--- modules/sftp-method.c	23 Feb 2006 19:08:12 -0000	1.40
+++ modules/sftp-method.c	20 Mar 2006 11:57:42 -0000
@@ -59,6 +59,7 @@
 #include <libgnomevfs/gnome-vfs-mime.h>
 #include <libgnomevfs/gnome-vfs-mime-utils.h>
 #include <libgnomevfs/gnome-vfs-module-callback-module-api.h>
+#include <libgnomevfs/gnome-vfs-ops.h>
 #include <libgnomevfs/gnome-vfs-standard-callbacks.h>
 
 #include <string.h>
@@ -2689,6 +2894,11 @@ do_make_directory (GnomeVFSMethod  *meth
 	sftp_connection_unref (conn);
 	sftp_connection_unlock (conn);
 
+	if (res == GNOME_VFS_ERROR_GENERIC &&
+	    gnome_vfs_uri_exists (uri)) {
+		res = GNOME_VFS_ERROR_FILE_EXISTS;
+	}
+
 	return res;
 }
 
