mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-13 01:08:41 -09:00
Fix counting of sizes for new directories
This commit is contained in:
parent
f473f3605e
commit
a915fc0836
1 changed files with 1 additions and 1 deletions
|
|
@ -204,7 +204,7 @@ const ScanDir = struct {
|
||||||
// entire subtree, which, in turn, would break all shared hardlink
|
// entire subtree, which, in turn, would break all shared hardlink
|
||||||
// sizes. The current approach may result in incorrect sizes after
|
// sizes. The current approach may result in incorrect sizes after
|
||||||
// refresh, but I expect the difference to be fairly minor.
|
// refresh, but I expect the difference to be fairly minor.
|
||||||
if (e.etype != .dir and (e.blocks != stat.blocks or e.size != stat.size)) {
|
if (!(e.etype == .dir and e.counted) and (e.blocks != stat.blocks or e.size != stat.size)) {
|
||||||
e.delStats(parents);
|
e.delStats(parents);
|
||||||
e.blocks = stat.blocks;
|
e.blocks = stat.blocks;
|
||||||
e.size = stat.size;
|
e.size = stat.size;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue