--- libgnome-2.15.1/libgnome/gnome-init.c.stathome 2006-06-13 20:08:05.000000000 +0200 +++ libgnome-2.15.1/libgnome/gnome-init.c 2006-07-10 16:47:03.000000000 +0200 @@ -336,6 +336,8 @@ static void libgnome_userdir_setup (gboolean create_dirs) { + struct stat statbuf; + if(!gnome_user_dir) { const char *override; @@ -398,9 +400,13 @@ } } - + if (stat (gnome_user_private_dir, &statbuf) < 0) { + g_printerr (_("Could not stat private per-user gnome configuration directory `%s': %s\n"), + gnome_user_private_dir, strerror(errno)); + exit(1); + } /* change mode to 0700 on the private directory */ - if (g_chmod (gnome_user_private_dir, 0700) < 0) { + if (((statbuf.st_mode & 0700) != 0700 ) && g_chmod (gnome_user_private_dir, 0700) < 0) { g_printerr (_("Could not set mode 0700 on private per-user gnome configuration directory `%s': %s\n"), gnome_user_private_dir, strerror(errno)); exit(1);