diff options
Diffstat (limited to 'surf.c')
-rw-r--r-- | surf.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -333,10 +333,11 @@ buildpath(const char *path) p = (char *)&path[1]; homedir = getcurrentuserhomedir(); } else { - if ((p = strchr(path, '/'))) + if ((p = strchr(path, '/'))) { name = g_strndup(&path[1], --p - path); - else + } else { name = g_strdup(&path[1]); + } homedir = getuserhomedir(name); g_free(name); |