mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Another part that needs special handling for root
This commit is contained in:
parent
3277201075
commit
f05f98e4fe
6
noice.c
6
noice.c
|
@ -468,7 +468,11 @@ nochange:
|
||||||
|
|
||||||
name = dents[cur].name;
|
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(name);
|
||||||
DPRINTF_S(pathnew);
|
DPRINTF_S(pathnew);
|
||||||
|
|
Loading…
Reference in a new issue