need to convert script-fu-path to filesystem encoding. Should fix bug

2005-03-04  Sven Neumann  <sven@gimp.org>

	* plug-ins/script-fu/script-fu-scripts.c (script_fu_find_scripts):
	need to convert script-fu-path to filesystem encoding. Should fix
	bug #165002.
This commit is contained in:
Sven Neumann
2005-03-04 16:27:59 +00:00
committed by Sven Neumann
parent c3ba95758f
commit 8312bf270b
2 changed files with 22 additions and 5 deletions

View File

@ -1,3 +1,9 @@
2005-03-04 Sven Neumann <sven@gimp.org>
* plug-ins/script-fu/script-fu-scripts.c (script_fu_find_scripts):
need to convert script-fu-path to filesystem encoding. Should fix
bug #165002.
2005-03-04 Sven Neumann <sven@gimp.org>
* plug-ins/common/*: ported to gstdio, removed unnecessary includes.

View File

@ -94,7 +94,9 @@ static GList *script_menu_list = NULL;
void
script_fu_find_scripts (void)
{
gchar *path_str;
gchar *path_str;
gchar *path;
GError *error = NULL;
/* Make sure to clear any existing scripts */
if (script_tree != NULL)
@ -109,15 +111,24 @@ script_fu_find_scripts (void)
path_str = gimp_gimprc_query ("script-fu-path");
if (path_str == NULL)
if (! path_str)
return;
gimp_datafiles_read_directories (path_str, G_FILE_TEST_IS_REGULAR,
path = g_filename_from_utf8 (path_str, -1, NULL, NULL, &error);
g_free (path_str);
if (! path)
{
g_warning ("Can't convert script-fu-path to filesystem encoding: %s",
error->message);
g_error_free (error);
return;
}
gimp_datafiles_read_directories (path, G_FILE_TEST_IS_REGULAR,
script_fu_load_script,
NULL);
g_free (path_str);
/* Now that all scripts are read in and sorted, tell gimp about them */
g_tree_foreach (script_tree,
(GTraverseFunc) script_fu_install_script,