diff options
| author | 2014-10-10 13:22:18 +0300 | |
|---|---|---|
| committer | 2014-10-10 13:22:18 +0300 | |
| commit | f05f98e4feb9a6100301800870c74365c5430ac9 (patch) | |
| tree | efe6d168f365fe0938a6072dfb189dbb700d1e0a | |
| parent | 327720107565e730a15b8d16351c8c4efd34a471 (diff) | |
| download | nnn-f05f98e4feb9a6100301800870c74365c5430ac9.tar.gz | |
Another part that needs special handling for root
| -rw-r--r-- | noice.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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); |