]> Dogcows Code - chaz/openbox/commitdiff
use the path properly for the session file
authorDana Jansens <danakj@orodu.net>
Mon, 28 Jul 2003 04:53:51 +0000 (04:53 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 28 Jul 2003 04:53:51 +0000 (04:53 +0000)
openbox/session.c

index 12af441f583d38cf8801ec3a1721f62b8b8ffb13..9ee9f04d8a695ff08718993303c5d696776ceb91 100644 (file)
@@ -41,7 +41,6 @@ static void save_commands()
     SmProp *props[2];
     SmProp prop_cmd = { SmCloneCommand, SmLISTofARRAY8, 1, };
     SmProp prop_res = { SmRestartCommand, SmLISTofARRAY8, };
     SmProp *props[2];
     SmProp prop_cmd = { SmCloneCommand, SmLISTofARRAY8, 1, };
     SmProp prop_res = { SmRestartCommand, SmLISTofARRAY8, };
-    gchar *file_path;
     gint i, j, n;
     gboolean has_id = FALSE, has_file = FALSE;
 
     gint i, j, n;
     gboolean has_id = FALSE, has_file = FALSE;
 
@@ -80,19 +79,15 @@ static void save_commands()
         }
     }
 
         }
     }
 
-    file_path = g_build_filename(g_get_home_dir(), ".openbox", "sessions",
-                                 save_file, NULL);
-
     prop_res.vals[j].value = "--sm-save-file";
     prop_res.vals[j++].length = strlen("--sm-save-file");
     prop_res.vals[j].value = "--sm-save-file";
     prop_res.vals[j++].length = strlen("--sm-save-file");
-    prop_res.vals[j].value = file_path;
-    prop_res.vals[j++].length = strlen(file_path);
+    prop_res.vals[j].value = save_file;
+    prop_res.vals[j++].length = strlen(save_file);
 
     props[0] = &prop_res;
     props[1] = &prop_cmd;
     SmcSetProperties(sm_conn, 1, props);
 
 
     props[0] = &prop_res;
     props[1] = &prop_cmd;
     SmcSetProperties(sm_conn, 1, props);
 
-    g_free(file_path);
     g_free(prop_res.vals);
     g_free(prop_cmd.vals);
 }
     g_free(prop_res.vals);
     g_free(prop_cmd.vals);
 }
This page took 0.028039 seconds and 4 git commands to generate.