1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 04:16:38 +02:00

Add function "string_expand_home" in plugin API, fix bug with replacement of home in paths

This commit is contained in:
Sebastien Helleu
2010-05-02 18:21:58 +02:00
parent 1836b40a4a
commit 4616ca981e
15 changed files with 154 additions and 43 deletions
+1 -13
View File
@@ -482,19 +482,7 @@ script_search_path (struct t_weechat_plugin *weechat_plugin,
struct stat st;
if (filename[0] == '~')
{
dir_home = getenv ("HOME");
if (!dir_home)
return NULL;
length = strlen (dir_home) + strlen (filename + 1) + 1;
final_name = malloc (length);
if (final_name)
{
snprintf (final_name, length, "%s%s", dir_home, filename + 1);
return final_name;
}
return NULL;
}
return weechat_string_expand_home (filename);
dir_home = weechat_info_get ("weechat_dir", "");
if (dir_home)