Skip to content

Commit

Permalink
stickynotes: create parent dir for "stickynotes-applet.xml" if it doe…
Browse files Browse the repository at this point in the history
…s not exist. Fixes issue #254
  • Loading branch information
oliver-joos authored and raveit65 committed Jul 10, 2017
1 parent 724ca97 commit a57972f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stickynotes/stickynotes.c
Expand Up @@ -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>

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit a57972f

Please sign in to comment.