[Xfce4-commits] <xfce4-clipman-plugin:master> actions: Make sure configuration directory for actions exists
Mike Massonnet
noreply at xfce.org
Tue Mar 6 00:04:02 CET 2012
Updating branch refs/heads/master
to ac76217136acd1baf82ae241460517241bc26786 (commit)
from f4af6d538d5974a99d6eb4f7a1f17e57d88d116d (commit)
commit ac76217136acd1baf82ae241460517241bc26786
Author: Mike Massonnet <mmassonnet at xfce.org>
Date: Mon Mar 5 21:14:06 2012 +0100
actions: Make sure configuration directory for actions exists
panel-plugin/actions.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/panel-plugin/actions.c b/panel-plugin/actions.c
index e915361..fc8254d 100644
--- a/panel-plugin/actions.c
+++ b/panel-plugin/actions.c
@@ -771,6 +771,13 @@ clipman_actions_load (ClipmanActions *actions)
if (!load)
{
+ /* Create user directory early to be sure it exists for next actions */
+ GFile *dir = g_file_get_parent (actions->priv->file);
+ g_file_make_directory_with_parents (dir, NULL, NULL);
+ g_object_unref (dir);
+ dir = NULL;
+
+ /* Load from system wide file */
filename = g_strdup (SYSCONFDIR"/xdg/xfce4/panel/xfce4-clipman-actions.xml");
load = g_file_get_contents (filename, &data, (gsize*)&size, NULL);
g_free (filename);
More information about the Xfce4-commits
mailing list