Code

Create additional user subdir's. Fixes bug #437938.
authorjoncruz <joncruz@users.sourceforge.net>
Wed, 30 Sep 2009 07:40:21 +0000 (07:40 +0000)
committerjoncruz <joncruz@users.sourceforge.net>
Wed, 30 Sep 2009 07:40:21 +0000 (07:40 +0000)
src/inkscape.cpp

index fc9aff78e2bb9e9fed0eb853d81878a8f385127e..586abd22b7056bb55dd701f678e54c50e6dc5267 100644 (file)
@@ -1482,6 +1482,13 @@ profile_path(const char *filename)
             if ( g_mkdir_with_parents(prefdir, mode) == -1 ) {
                 int problem = errno;
                 g_warning("Unable to create profile directory (%s) (%d)", g_strerror(problem), problem);
+            } else {
+                gchar const *userDirs[] = {"keys", "templates", "icons", "extensions", "palettes", NULL};
+                for (gchar const** name = userDirs; *name; ++name) {
+                    gchar *dir = g_build_filename(prefdir, *name, NULL);
+                    g_mkdir_with_parents(dir, mode);
+                    g_free(dir);
+                }
             }
         }
     }