? libgnomevfs/gnome-vfs-xfer.c.flc
? libgnomevfs/invalid-uri-writability.diff
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-vfs/ChangeLog,v
retrieving revision 1.1336
diff -u -r1.1336 ChangeLog
--- ChangeLog	13 Jun 2002 19:20:54 -0000	1.1336
+++ ChangeLog	14 Jun 2002 00:58:08 -0000
@@ -1,3 +1,9 @@
+2002-06-13  Alex Graveley  <alex@ximian.com>
+
+	* libgnomevfs/gnome-vfs-init.c (gnome_vfs_init): Always ensure
+	~/.gnome exists before initializing.
+	(ensure_dot_gnome_exists): Create ~/.gnome if it does not exist.
+
 2002-06-13  Damon Chaplin  <damon@ximian.com>
 
 	* modules/file-method.c (do_find_directory): always use 0700 (S_IRWXU)
Index: libgnomevfs/gnome-vfs-init.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/libgnomevfs/gnome-vfs-init.c,v
retrieving revision 1.22
diff -u -r1.22 gnome-vfs-init.c
--- libgnomevfs/gnome-vfs-init.c	9 Apr 2002 22:05:31 -0000	1.22
+++ libgnomevfs/gnome-vfs-init.c	14 Jun 2002 00:58:08 -0000
@@ -32,21 +32,51 @@
 #include "gnome-vfs-method.h"
 #include "gnome-vfs-process.h"
 #include "gnome-vfs-utils.h"
+#include <errno.h>
 #include <bonobo-activation/bonobo-activation.h>
 #include <glib/gmessages.h>
+#include <glib/gfileutils.h>
 #include <libgnomevfs/gnome-vfs-pthread.h>
 #include <libgnomevfs/gnome-vfs-job-slave.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 
 static gboolean vfs_already_initialized = FALSE;
 G_LOCK_DEFINE_STATIC (vfs_already_initialized);
 
 static GPrivate * private_is_primary_thread;
 
+static gboolean
+ensure_dot_gnome_exists (void)
+{
+	gboolean retval = TRUE;
+	gchar *dirname;
+
+	dirname = g_build_filename (g_get_home_dir (), ".gnome", NULL);
+
+	if (!g_file_test (dirname, G_FILE_TEST_EXISTS)) {
+		if (mkdir (dirname, S_IRWXU) != 0) {
+			g_warning ("Unable to create ~/.gnome directory: %s",
+				   g_strerror (errno));
+			retval = FALSE;
+		}
+	} else if (!g_file_test (dirname, G_FILE_TEST_IS_DIR)) {
+		g_warning ("Error: ~/.gnome must be a directory.");
+		retval = FALSE;
+	}
+
+	g_free (dirname);
+	return retval;
+}
+
 gboolean 
 gnome_vfs_init (void)
 {
 	gboolean retval;
 	char *bogus_argv[2] = { "dummy", NULL };
+
+	if (!ensure_dot_gnome_exists ())
+		return FALSE;
 
 	G_LOCK (vfs_already_initialized);
 
