diff options
author | oliver-joos <[email protected]> | 2017-07-01 16:06:43 +0200 |
---|---|---|
committer | oliver-joos <[email protected]> | 2017-07-01 16:06:43 +0200 |
commit | d7b09bc1837535cfb9baba669410f721957d984f (patch) | |
tree | 08b58d9f28e6d05bbe085e38214ffeefeaa07437 /stickynotes/stickynotes.c | |
parent | 58e891a51e9aefcb4468a657f10856a72159d93c (diff) | |
download | mate-applets-d7b09bc1837535cfb9baba669410f721957d984f.tar.bz2 mate-applets-d7b09bc1837535cfb9baba669410f721957d984f.tar.xz |
stickynotes: create parent dir for "stickynotes-applet.xml" if it does not exist. Fixes issue #254
Diffstat (limited to 'stickynotes/stickynotes.c')
-rw-r--r-- | stickynotes/stickynotes.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/stickynotes/stickynotes.c b/stickynotes/stickynotes.c index faed2de9..3f1256a4 100644 --- a/stickynotes/stickynotes.c +++ b/stickynotes/stickynotes.c @@ -25,6 +25,7 @@ #define WNCK_I_KNOW_THIS_IS_UNSTABLE 1 #include <libwnck/libwnck.h> #include <string.h> +#include <sys/stat.h> #include <gtksourceview/gtksource.h> @@ -778,7 +779,8 @@ stickynotes_save_now (void) /* The XML file is $HOME/.config/mate/stickynotes-applet, most probably */ { - gchar* file = g_build_filename(g_get_user_config_dir(), "mate", "stickynotes-applet.xml", NULL); + gchar* file = g_build_filename(g_get_user_config_dir(), "mate", "stickynotes-applet.xml", NULL); + g_mkdir_with_parents(g_path_get_dirname(file), S_IRWXU); xmlSaveFormatFile(file, doc, 1); |