Skip to content
Snippets Groups Projects
Commit 6d5ae5eb authored by Yorhel's avatar Yorhel
Browse files

Fixed minor size + item count inconsistency on recalculating a dir

Namely, the 'parent' dir item itself that is recalculated isn't
reconsidered in its parents.
parent d297af2c
No related branches found
No related tags found
No related merge requests found
...@@ -399,6 +399,15 @@ void calc_process() { ...@@ -399,6 +399,15 @@ void calc_process() {
stcalc.parent = t; stcalc.parent = t;
stcalc.curdev = fs.st_dev; stcalc.curdev = fs.st_dev;
/* update parents, if any */
if(stcalc.orig) {
for(t=t->parent; t!=NULL; t=t->parent) {
t->size += stcalc.parent->size;
t->asize += stcalc.parent->asize;
t->items++;
}
}
/* start calculating */ /* start calculating */
if(!calc_dir(stcalc.parent, tmp) && !stcalc.err) { if(!calc_dir(stcalc.parent, tmp) && !stcalc.err) {
pstate = ST_BROWSE; pstate = ST_BROWSE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment