mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
Automatic appending of .pl to script name didn't work for file names
less than 4 chars. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@787 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
ed1b4e69a9
commit
25fa27c5f0
@ -281,7 +281,7 @@ static void cmd_run(const char *data)
|
||||
fname = g_strdup(data);
|
||||
} else {
|
||||
/* add .pl suffix if it's missing */
|
||||
name = (strlen(data) <= 3 || strcmp(data+strlen(data)-3, ".pl") == 0) ?
|
||||
name = (strlen(data) > 3 && strcmp(data+strlen(data)-3, ".pl") == 0) ?
|
||||
g_strdup(data) : g_strdup_printf("%s.pl", data);
|
||||
|
||||
/* check from ~/.irssi/scripts/ */
|
||||
|
Loading…
Reference in New Issue
Block a user