--- libgnome-2.15.1/libgnome/gnome-init.c.stat-homedir 2006-06-13 14:08:05.000000000 -0400
+++ libgnome-2.15.1/libgnome/gnome-init.c 2006-07-12 16:22:05.000000000 -0400
@@ -336,6 +336,8 @@
static void
libgnome_userdir_setup (gboolean create_dirs)
{
+ struct stat statbuf;
+
if(!gnome_user_dir) {
const char *override;
@@ -399,8 +401,15 @@
}
+ 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);