Another part that needs special handling for root

This commit is contained in:
lostd 2014-10-10 13:22:18 +03:00
parent 3277201075
commit f05f98e4fe
1 changed files with 5 additions and 1 deletions

View File

@ -468,7 +468,11 @@ nochange:
name = dents[cur].name;
asprintf(&pathnew, "%s/%s", path, name);
/* Handle root case */
if (strcmp(path, "/") == 0)
asprintf(&pathnew, "/%s", name);
else
asprintf(&pathnew, "%s/%s", path, name);
DPRINTF_S(name);
DPRINTF_S(pathnew);