mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-18 03:28:40 -09:00
Fixed major bug with counting all sizes twice
I have absolutely no idea when I introduced this bug, will check the history later.
This commit is contained in:
parent
34ba5348c8
commit
d297af2ce8
1 changed files with 2 additions and 2 deletions
|
|
@ -211,14 +211,14 @@ int calc_item(struct dir *par, char *path, char *name) {
|
||||||
|
|
||||||
/* update parent dirs */
|
/* update parent dirs */
|
||||||
if(!(d->flags & FF_EXL))
|
if(!(d->flags & FF_EXL))
|
||||||
for(t=d; t!=NULL; t=t->parent)
|
for(t=d->parent; t!=NULL; t=t->parent)
|
||||||
t->items++;
|
t->items++;
|
||||||
|
|
||||||
/* count the size */
|
/* count the size */
|
||||||
if(!(d->flags & FF_EXL || d->flags & FF_OTHFS)) {
|
if(!(d->flags & FF_EXL || d->flags & FF_OTHFS)) {
|
||||||
d->size = fs.st_blocks * S_BLKSIZE;
|
d->size = fs.st_blocks * S_BLKSIZE;
|
||||||
d->asize = fs.st_size;
|
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->size += d->size;
|
||||||
t->asize += d->asize;
|
t->asize += d->asize;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue