gnome-desktop r5361 - trunk/libgnome-desktop



Author: vuntz
Date: Sun Jan 25 02:36:18 2009
New Revision: 5361
URL: http://svn.gnome.org/viewvc/gnome-desktop?rev=5361&view=rev

Log:
2009-01-25  Vincent Untz  <vuntz gnome org>

	* gnome-rr-config.c: (get_config_filename): create the config dir if it
	doesn't already exist, thus allowing creation of the config file :-)


Modified:
   trunk/libgnome-desktop/ChangeLog
   trunk/libgnome-desktop/gnome-rr-config.c

Modified: trunk/libgnome-desktop/gnome-rr-config.c
==============================================================================
--- trunk/libgnome-desktop/gnome-rr-config.c	(original)
+++ trunk/libgnome-desktop/gnome-rr-config.c	Sun Jan 25 02:36:18 2009
@@ -926,7 +926,16 @@
 static gchar *
 get_config_filename (void)
 {
-    return g_build_filename (g_get_user_config_dir (), CONFIG_BASENAME, NULL);
+    const char *config_dir;
+
+    config_dir = g_get_user_config_dir ();
+
+    if (!g_file_test (config_dir, G_FILE_TEST_IS_DIR))
+    {
+        g_mkdir_with_parents (config_dir, 0700);
+    }
+
+    return g_build_filename (config_dir, CONFIG_BASENAME, NULL);
 }
 
 static const char *



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]