mirror of
https://github.com/weechat/weechat.git
synced 2026-07-10 19:53:13 +02:00
core: fix expand of path "~" to home of user in function string_expand_home ("~/xxx" was ok, but not "~")
This commit is contained in:
@@ -476,8 +476,11 @@ string_expand_home (const char *path)
|
||||
if (!path)
|
||||
return NULL;
|
||||
|
||||
if (!path[0] || (path[0] != '~') || (path[1] != DIR_SEPARATOR_CHAR))
|
||||
if (!path[0] || (path[0] != '~')
|
||||
|| ((path[1] && path[1] != DIR_SEPARATOR_CHAR)))
|
||||
{
|
||||
return strdup (path);
|
||||
}
|
||||
|
||||
ptr_home = getenv ("HOME");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user