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

View file

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