]> Dogcows Code - chaz/openbox/blobdiff - openbox/session.c
move the xdg path stuff into obt/paths.[ch], and make render and openbox use it
[chaz/openbox] / openbox / session.c
index e6883f32b80a72ae88a63185d29f4c29b2babf39..c38a8204ca018a238086d3ab852c23dccfcef501 100644 (file)
@@ -41,6 +41,7 @@ GList* session_state_find(struct _ObClient *c) { return NULL; }
 #include "focus.h"
 #include "gettext.h"
 #include "obt/parse.h"
+#include "obt/paths.h"
 
 #include <time.h>
 #include <errno.h>
@@ -90,15 +91,18 @@ static void session_state_free(ObSessionState *state);
 void session_startup(gint argc, gchar **argv)
 {
     gchar *dir;
+    ObtPaths *p;
 
     if (!ob_sm_use) return;
 
     sm_argc = argc;
     sm_argv = argv;
 
-    dir = g_build_filename(parse_xdg_data_home_path(),
-                           "openbox", "sessions", NULL);
-    if (!parse_mkdir_path(dir, 0700)) {
+    p = obt_paths_new();
+    dir = g_build_filename(obt_paths_data_home(p), "openbox", "sessions",NULL);
+    obt_paths_unref(p), p = NULL;
+
+    if (!obt_paths_mkdir_path(dir, 0700)) {
         g_message(_("Unable to make directory '%s': %s"),
                   dir, g_strerror(errno));
     }
This page took 0.0219 seconds and 4 git commands to generate.