From d03bd6b443a6b98430eed983cb1996bebb302d9e Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Sat, 17 Jul 2010 12:42:44 -0400 Subject: on NFS create a temp dir for the shm file dconf should be vaguely NFS-safe now --- common/dconf-shmdir.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'common') diff --git a/common/dconf-shmdir.c b/common/dconf-shmdir.c index d94f5c3..4eaa376 100644 --- a/common/dconf-shmdir.c +++ b/common/dconf-shmdir.c @@ -1,4 +1,5 @@ #include "dconf-shmdir.h" + #include #include #include @@ -41,13 +42,15 @@ dconf_shmdir_from_environment (void) const gchar *cache = g_get_user_cache_dir (); if (is_local (cache)) - result = g_build_filename (cache, "dconf", NULL); - } - - if (g_mkdir_with_parents (result, 0700)) - { - g_free (result); - result = NULL; + { + result = g_build_filename (cache, "dconf", NULL); + + if (g_mkdir_with_parents (result, 0700) != 0) + { + g_free (result); + result = NULL; + } + } } return result; -- cgit v1.2.1