Create as needed when opening user addon target folder

This commit is contained in:
Paweł Forysiuk 2012-05-21 23:07:31 +02:00 committed by Christian Dywan
parent 7fad1fedf7
commit 5cd78ae297

View file

@ -522,10 +522,16 @@ addons_open_target_folder_clicked_cb (GtkWidget* toolitem,
folder = g_path_get_dirname (element->fullpath); folder = g_path_get_dirname (element->fullpath);
} }
else else
{
folder = g_build_path (G_DIR_SEPARATOR_S, g_get_user_data_dir (), folder = g_build_path (G_DIR_SEPARATOR_S, g_get_user_data_dir (),
PACKAGE_NAME, PACKAGE_NAME,
addons->kind == ADDONS_USER_SCRIPTS addons->kind == ADDONS_USER_SCRIPTS
? "scripts" : "styles", NULL); ? "scripts" : "styles", NULL);
if (!g_file_test (folder, G_FILE_TEST_EXISTS))
katze_mkdir_with_parents (folder, 0700);
}
folder_uri = g_filename_to_uri (folder, NULL, NULL); folder_uri = g_filename_to_uri (folder, NULL, NULL);
g_free (folder); g_free (folder);