[GNOME VFS] PATCH: handle invalid uri when creating .vfs-write.tmp

Alex Graveley <[email protected]>
Newsgroups gmane.comp.gnome.vfs
Message-ID <1021631610.26778.1298.camel@luna>
Hi,

Currently GNOME_VFS_ERROR_INVALID_URI is not handled when checking for
directory writability by creating a .vfs-write.tmp file.  This causes
problems for the vfolder method, which expects created files to end in
.desktop or .directory.  So instead of adding hacks there, this patch
fixes the source problem by assuming writability.

Ok to commit?

-Alex

-- 
"I don't find excessive sanity a virtue."
invalid-uri-writability.diff (text/plain, 627 B)
? gnome-vfs-xfer.c.flc
? invalid-uri-writability.diff
Index: gnome-vfs-xfer.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-xfer.c,v
retrieving revision 1.97
diff -u -r1.97 gnome-vfs-xfer.c
--- gnome-vfs-xfer.c	27 Jan 2002 21:42:52 -0000	1.97
+++ gnome-vfs-xfer.c	17 May 2002 10:42:15 -0000
@@ -1975,6 +1975,11 @@
 		result = GNOME_VFS_OK;
 	}
 	
+	/* some methods only allow certain filenames (e.g. .desktop files) */
+	if (result == GNOME_VFS_ERROR_INVALID_URI) {
+		result = GNOME_VFS_OK;
+	}
+
 	gnome_vfs_uri_unref (test_uri);
 	return result;
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.