mirror of https://github.com/GNOME/gimp.git
app: interpreter arguments for plugins not returned.
When a plugin file's shebang would start with "/usr/bin/env", the interpreter's arguments were not returned by resolve_sh_bang().
This commit is contained in:
parent
4b9bd6ba7d
commit
da4247d87c
|
@ -692,12 +692,18 @@ resolve_sh_bang (GimpInterpreterDB *db,
|
|||
{
|
||||
if (strcmp ("/usr/bin/env", name) == 0)
|
||||
{
|
||||
program = g_hash_table_lookup (db->programs, cp);
|
||||
if (program)
|
||||
return g_strdup (program);
|
||||
/* Shift program name and arguments to the right. */
|
||||
name = cp;
|
||||
|
||||
for ( ; *cp && (*cp != ' ') && (*cp != '\t'); cp++)
|
||||
;
|
||||
|
||||
while ((*cp == ' ') || (*cp == '\t'))
|
||||
*cp++ = '\0';
|
||||
}
|
||||
|
||||
*interp_arg = g_strdup (cp);
|
||||
if (*cp)
|
||||
*interp_arg = g_strdup (cp);
|
||||
}
|
||||
|
||||
program = g_hash_table_lookup (db->programs, name);
|
||||
|
|
Loading…
Reference in New Issue