diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2012-12-06 13:52:13 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2012-12-06 13:52:13 +0100 |
commit | eabf103e71b64a7abc3dc8c6ec35bab2b1a7650c (patch) | |
tree | 761186904cb731db048f96aa52c36edb08de9271 /src | |
parent | 822ae765435824650ae8fe6f538489d1090c044f (diff) | |
download | weechat-eabf103e71b64a7abc3dc8c6ec35bab2b1a7650c.zip |
core: expand char '~' with user home in first argument of hook_process
Diffstat (limited to 'src')
-rw-r--r-- | src/core/wee-hook.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c index 5dd62f98d..94bc11a69 100644 --- a/src/core/wee-hook.c +++ b/src/core/wee-hook.c @@ -1413,7 +1413,7 @@ hook_process (struct t_weechat_plugin *plugin, void hook_process_child (struct t_hook *hook_process) { - char **exec_args, str_arg[64]; + char **exec_args, *arg0, str_arg[64]; const char *ptr_url, *ptr_arg; int rc, i, num_args; @@ -1503,6 +1503,12 @@ hook_process_child (struct t_hook *hook_process) if (exec_args) { + arg0 = string_expand_home (exec_args[0]); + if (arg0) + { + free (exec_args[0]); + exec_args[0] = arg0; + } if (weechat_debug_core >= 1) { log_printf ("hook_process, command='%s'", |