mirror of
https://github.com/irssi/irssi.git
synced 2026-08-09 03:40:16 +02: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue