Commits

jjacky committed 60b221a

- saving preferences if the folder (~/.config/kalu) did not already exist would fail, fixed
- bumped to 0.1.2

Comments (0)

Files changed (2)

 
 #define _UNUSED_            __attribute__ ((unused)) 
 
-#define KALU_VERSION       "0.1.1"
+#define KALU_VERSION       "0.1.2"
 #define KALU_TAG            "Keeping Arch Linux Up-to-date"
 
 #define MAX_PATH            255
     char conffile[MAX_PATH];
     GError *error = NULL;
     snprintf (conffile, MAX_PATH - 1, "%s/.config/kalu/kalu.conf", g_get_home_dir ());
+    if (!ensure_path (conffile))
+    {
+        s = strrchr (conffile, '/');
+        *s = '\0';
+        s = g_strdup_printf ("%s cannot be created or is not a folder", conffile);
+        show_error ("Unable to write configuration file", s,
+                    GTK_WINDOW (window));
+        g_free (s);
+        goto clean_on_error;
+    }
     if (!g_file_set_contents (conffile, conf, -1, &error))
     {
         show_error ("Unable to write configuration file", error->message,