diff options
Diffstat (limited to 'src/core/wee-string.c')
-rw-r--r-- | src/core/wee-string.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/wee-string.c b/src/core/wee-string.c index 885d88ec8..1d16d6d0f 100644 --- a/src/core/wee-string.c +++ b/src/core/wee-string.c @@ -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"); |