summaryrefslogtreecommitdiff
path: root/stickynotes/stickynotes.c
diff options
context:
space:
mode:
authoroliver-joos <[email protected]>2017-07-01 16:06:43 +0200
committerraveit65 <[email protected]>2017-07-10 18:43:27 +0200
commita57972f035d7a9541ed54d34ca666b01ebb37d8f (patch)
tree87cd8ae46b06ac6384d6488b5e80a79b4923c698 /stickynotes/stickynotes.c
parent724ca97c2727287ca839ff0dcc41238bbbc16af5 (diff)
downloadmate-applets-a57972f035d7a9541ed54d34ca666b01ebb37d8f.tar.bz2
mate-applets-a57972f035d7a9541ed54d34ca666b01ebb37d8f.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.c4
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);