mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-14 09:48:40 -09:00
Fixed display of one-component-after-root directory
Bug introduced in ece21a668d
It's amazing how many mistakes one person can make in a few hours.
This commit is contained in:
parent
91b131a080
commit
2a5c9a242f
1 changed files with 2 additions and 2 deletions
|
|
@ -344,13 +344,13 @@ void calc_process() {
|
||||||
strcpy(t->name, orig->name);
|
strcpy(t->name, orig->name);
|
||||||
} else {
|
} else {
|
||||||
t->name = malloc(strlen(path)+strlen(name)+1);
|
t->name = malloc(strlen(path)+strlen(name)+1);
|
||||||
|
t->name[0] = 0;
|
||||||
if(strcmp(path, "/"))
|
if(strcmp(path, "/"))
|
||||||
strcpy(t->name, path);
|
strcpy(t->name, path);
|
||||||
if(strcmp(name, ".")) {
|
if(strcmp(name, ".")) {
|
||||||
strcat(t->name, "/");
|
strcat(t->name, "/");
|
||||||
strcat(t->name, name);
|
strcat(t->name, name);
|
||||||
} else
|
}
|
||||||
t->name[0] = 0;
|
|
||||||
}
|
}
|
||||||
root = t;
|
root = t;
|
||||||
curdev = fs.st_dev;
|
curdev = fs.st_dev;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue