rpms/gvfs/F-11 gvfs-1.3.5-mkdir-exists-error.patch, NONE, 1.1 gvfs.spec, 1.141, 1.142

Tomas Bzatek tbzatek at fedoraproject.org
Mon Aug 17 14:52:34 UTC 2009


Author: tbzatek

Update of /cvs/extras/rpms/gvfs/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv29903

Modified Files:
	gvfs.spec 
Added Files:
	gvfs-1.3.5-mkdir-exists-error.patch 
Log Message:
* Mon Aug 17 2009 Tomas Bzatek <tbzatek at redhat.com> - 1.2.3-11
- Fix Nautilus can't create "untitled folder" on sftp mounts (#512611)


gvfs-1.3.5-mkdir-exists-error.patch:
 gvfsbackendsftp.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- NEW FILE gvfs-1.3.5-mkdir-exists-error.patch ---
>From 3fe8a3b48eb45392db2489434fb1b3682ccdc5ab Mon Sep 17 00:00:00 2001
From: Tomas Bzatek <tbzatek at redhat.com>
Date: Mon, 17 Aug 2009 15:40:52 +0200
Subject: [PATCH] sftp: return proper error when directory exists

Nautilus depends on properly reported errors when an operation fails.
In this case, user was not able to create new directory on sftp share
when "untitled folder" already existed.

So let's mask sftp's universal SSH_FX_FAILURE error for SSH_FXP_MKDIR.
Specification says: "An error will be returned if a file or directory
with the specified path already exists."
---
 daemon/gvfsbackendsftp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/daemon/gvfsbackendsftp.c b/daemon/gvfsbackendsftp.c
index f810b31..cf33eaf 100644
--- a/daemon/gvfsbackendsftp.c
+++ b/daemon/gvfsbackendsftp.c
@@ -4350,7 +4350,7 @@ make_directory_reply (GVfsBackendSftp *backend,
                       gpointer user_data)
 {
   if (reply_type == SSH_FXP_STATUS)
-    result_from_status (job, reply, -1, -1); 
+    result_from_status (job, reply, G_IO_ERROR_EXISTS, -1); 
   else
     g_vfs_job_failed (job, G_IO_ERROR, G_IO_ERROR_FAILED,
                       _("Invalid reply received"));
-- 
1.6.4



Index: gvfs.spec
===================================================================
RCS file: /cvs/extras/rpms/gvfs/F-11/gvfs.spec,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -p -r1.141 -r1.142
--- gvfs.spec	7 Aug 2009 13:23:00 -0000	1.141
+++ gvfs.spec	17 Aug 2009 14:52:33 -0000	1.142
@@ -1,7 +1,7 @@
 Summary: Backends for the gio framework in GLib
 Name: gvfs
 Version: 1.2.3
-Release: 10%{?dist}
+Release: 11%{?dist}
 License: LGPLv2+
 Group: System Environment/Libraries
 URL: http://www.gtk.org
@@ -46,6 +46,9 @@ Patch6: gvfs-1.3.4-smb-browse-fake-conte
 # Bad mount prefix stripping in g_daemon_file_get_path()
 # http://bugzilla.gnome.org/show_bug.cgi?id=590862
 Patch7: gvfs-1.3.4-dont-strip-mount-prefix-for-local-paths.patch
+# nautilus can't create "unamed folder X" if it exist on the target via sftp
+# https://bugzilla.redhat.com/show_bug.cgi?id=512611
+Patch8: gvfs-1.3.5-mkdir-exists-error.patch
 
 # Gdu volume monitor patches, from http://cgit.freedesktop.org/~david/gvfs/log/?h=gdu-volume-monitor
 #
@@ -182,6 +185,7 @@ media players (Media Transfer Protocol) 
 %patch5 -p1 -b .sftp-timeout
 %patch6 -p1 -b .smb-fake-content-type
 %patch7 -p1 -b .mount-prefix
+%patch8 -p1 -b .sftp-mkdir
 
 %patch101 -p1 -b .gdu-volume-monitor
 %patch102 -p1 -b .gdu-volumes-typo
@@ -347,6 +351,9 @@ update-desktop-database &> /dev/null ||:
 
 
 %changelog
+* Mon Aug 17 2009 Tomas Bzatek <tbzatek at redhat.com> - 1.2.3-11
+- Fix Nautilus can't create "untitled folder" on sftp mounts (#512611)
+
 * Fri Aug  7 2009 Tomas Bzatek <tbzatek at redhat.com> - 1.2.3-10
 - Fix bad mount prefix stripping (part of #509612)
 




More information about the scm-commits mailing list