mirror of https://github.com/GNOME/gimp.git
app: also search interpreters executable in $PATH.
Same as we did for binfmt-style lines, if the executable part (for
instance in `pygimp.interp`) is not an absolute path, let's allow
ourselves to find it in the environment $PATH.
(cherry picked from commit f3c5ed55c8
)
This commit is contained in:
parent
15075932be
commit
0af3ae81ff
|
@ -294,14 +294,22 @@ gimp_interpreter_db_add_program (GimpInterpreterDB *db,
|
||||||
|
|
||||||
if (! g_file_test (program, G_FILE_TEST_IS_EXECUTABLE))
|
if (! g_file_test (program, G_FILE_TEST_IS_EXECUTABLE))
|
||||||
{
|
{
|
||||||
g_message (_("Bad interpreter referenced in interpreter file %s: %s"),
|
program = g_find_program_in_path (program);
|
||||||
gimp_file_get_utf8_name (file),
|
if (! program || ! g_file_test (program, G_FILE_TEST_IS_EXECUTABLE))
|
||||||
gimp_filename_to_utf8 (program));
|
{
|
||||||
return;
|
g_message (_("Bad interpreter referenced in interpreter file %s: %s"),
|
||||||
|
gimp_file_get_utf8_name (file),
|
||||||
|
gimp_filename_to_utf8 (program));
|
||||||
|
if (program)
|
||||||
|
g_free (program);
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
program = g_strdup (program);
|
||||||
|
|
||||||
if (! g_hash_table_lookup (db->programs, name))
|
if (! g_hash_table_lookup (db->programs, name))
|
||||||
g_hash_table_insert (db->programs, g_strdup (name), g_strdup (program));
|
g_hash_table_insert (db->programs, g_strdup (name), program);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue