+ return ret;
+}
+
+gboolean parse_mkdir_path(const gchar *path, gint mode)
+{
+ gboolean ret = TRUE;
+
+ g_return_val_if_fail(path != NULL, FALSE);
+ g_return_val_if_fail(path[0] == '/', FALSE);
+
+ if (!g_file_test(path, G_FILE_TEST_IS_DIR)) {
+ gchar *c, *e;
+
+ c = g_strdup(path);
+ e = c;
+ while ((e = strchr(e + 1, '/'))) {
+ *e = '\0';
+ if (!(ret = parse_mkdir(c, mode)))
+ goto parse_mkdir_path_end;
+ *e = '/';
+ }
+ ret = parse_mkdir(c, mode);
+
+ parse_mkdir_path_end:
+ g_free(c);