core: fix expand of path "~" to home of user in function string_expand_home ("~/xxx" was ok, but not "~")
parent
f38f62e7d8
commit
496c7d3e18
|
@ -1,12 +1,14 @@
|
|||
WeeChat ChangeLog
|
||||
=================
|
||||
Sébastien Helleu <flashcode@flashtux.org>
|
||||
v0.3.7-rc3, 2012-02-20
|
||||
v0.3.7-rc3, 2012-02-25
|
||||
|
||||
|
||||
Version 0.3.7 (under dev!)
|
||||
--------------------------
|
||||
|
||||
* core: fix expand of path "~" to home of user in function string_expand_home
|
||||
("~/xxx" was ok, but not "~")
|
||||
* core: fix memory leak when closing buffer
|
||||
* core: fix memory leak in function util_search_full_lib_name
|
||||
* core: automatically add newline char after last pasted line (when pasting many
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue