[metacity/matching] save in the cache directory



commit 0b673bb9a09d6b974f297c9304be2e839492c906
Author: Thomas Thurman <tthurman gnome org>
Date:   Fri Jul 10 09:32:27 2009 -0400

    save in the cache directory

 src/core/matching.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/src/core/matching.c b/src/core/matching.c
index 883be52..c72a000 100644
--- a/src/core/matching.c
+++ b/src/core/matching.c
@@ -40,7 +40,19 @@ gchar *matching_keyfile_filename = NULL;
 static void
 matching_ensure_filename (void)
 {
-  matching_keyfile_filename = g_strdup ("/tmp/metacity-matching-2.conf");
+  if (matching_keyfile_filename)
+    return;
+
+  matching_keyfile_filename = g_build_filename (g_get_user_cache_dir (),
+                                                "metacity",
+                                                NULL);
+  g_mkdir_with_parents (matching_keyfile_filename, 0700);
+  g_free (matching_keyfile_filename);
+
+  matching_keyfile_filename = g_build_filename (g_get_user_cache_dir (),
+                                                "metacity",
+                                                "matching.conf",
+                                                NULL);
 }
 
 static void



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