summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-04-26 13:26:20 +0200
committerYorhel <git@yorhel.nl>2009-04-26 13:26:20 +0200
commit2a5c9a242f3af10e90ef8a22cc21758dda8a61a4 (patch)
tree7bcd6cbbede1ed79b0950ded3e645a2fffd049b3
parent91b131a0805a6932fa48255473b1edaa3bf031a1 (diff)
Fixed display of one-component-after-root directory
Bug introduced in ece21a668d43dac69c25315a22f1f7d0147f7198 It's amazing how many mistakes one person can make in a few hours.
-rw-r--r--src/calc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/calc.c b/src/calc.c
index 2be704c..2bef88e 100644
--- a/src/calc.c
+++ b/src/calc.c
@@ -344,13 +344,13 @@ void calc_process() {
strcpy(t->name, orig->name);
} else {
t->name = malloc(strlen(path)+strlen(name)+1);
+ t->name[0] = 0;
if(strcmp(path, "/"))
strcpy(t->name, path);
if(strcmp(name, ".")) {
strcat(t->name, "/");
strcat(t->name, name);
- } else
- t->name[0] = 0;
+ }
}
root = t;
curdev = fs.st_dev;