From d297af2ce8163480b771148e8b394a89b9853b81 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Thu, 16 Apr 2009 19:00:13 +0200 Subject: [PATCH] Fixed major bug with counting all sizes twice I have absolutely no idea when I introduced this bug, will check the history later. --- src/calc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calc.c b/src/calc.c index a8d929a..d6c29c1 100644 --- a/src/calc.c +++ b/src/calc.c @@ -211,14 +211,14 @@ int calc_item(struct dir *par, char *path, char *name) { /* update parent dirs */ if(!(d->flags & FF_EXL)) - for(t=d; t!=NULL; t=t->parent) + for(t=d->parent; t!=NULL; t=t->parent) t->items++; /* count the size */ if(!(d->flags & FF_EXL || d->flags & FF_OTHFS)) { d->size = fs.st_blocks * S_BLKSIZE; d->asize = fs.st_size; - for(t=d; t!=NULL; t=t->parent) { + for(t=d->parent; t!=NULL; t=t->parent) { t->size += d->size; t->asize += d->asize; }