mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
Compute absolute path name of argv[0] at startup to make Irssi::get_irssi_binary
useful again. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4377 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
ea9f3be18c
commit
46bc99acf8
@ -89,7 +89,7 @@ void session_set_binary(const char *path)
|
||||
{
|
||||
g_free_and_null(irssi_binary);
|
||||
|
||||
irssi_binary = g_strdup(path);
|
||||
irssi_binary = g_find_program_in_path(path);
|
||||
}
|
||||
|
||||
void session_upgrade(void)
|
||||
@ -110,9 +110,11 @@ static void cmd_upgrade(const char *data)
|
||||
char *binary;
|
||||
|
||||
if (*data == '\0')
|
||||
data = irssi_binary;
|
||||
binary = g_strdup(irssi_binary);
|
||||
else
|
||||
binary = g_find_program_in_path(data);
|
||||
|
||||
if ((binary = g_find_program_in_path(data)) == NULL)
|
||||
if (binary == NULL)
|
||||
cmd_return_error(CMDERR_PROGRAM_NOT_FOUND);
|
||||
|
||||
/* save the session */
|
||||
|
Loading…
Reference in New Issue
Block a user