imsnif / imsnif/diskonaut

Bug: Small files hidden from view

Open
#62 7 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
3.1k
Forks
96
PR merge metrics
No merged PRs in 30d

Description

Here is the display using `ncdu`:

```
--- /path/to/projects/shader_brot ------------------------------------------------------------------------
/..
1.1 GiB [##########] /target
216.0 KiB [ ] /.git
116.0 KiB [ ] Cargo.lock
20.0 KiB [ ] LICENSE
20.0 KiB [ ] /resources
20.0 KiB [ ] /src
4.0 KiB [ ] README.md
4.0 KiB [ ] TODO.md
4.0 KiB [ ] Cargo.toml
4.0 KiB [ ] .gitattributes
4.0 KiB [ ] .gitignore

┌───Item info──────────────────────────────────────────────┐
│ │
│ Name: target │
│ Path: /path/to/projects/shader_brot │
│ Type: Directory │
│ │
│ Disk usage: 1.1 GiB (1,180,995,584 B) │
│ Apparent size: 1.1 GiB (1,174,963,573 B) │
│ │
│ Press i to hide this window │
└──────────────────────────────────────────────────────────┘
```

here is the display in diskonaut:
```
Total: 1.4G (2797 files), freed: 0 | /path/to/projects/shader_brot
┌────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ │
│ │
│ │
│ │
│ target/ (+2740 descendants) │
│ │
│ 1.4G (100%) │
│ │
│ │
│ │
│ │
└────────────────────────────────────────────────────────────────────────────────────────────────────────┘
(x = Small files)
```

I ran the numbers:

- small files take up 425984B
- target takes up 0.999639430994373 of the directory (FP errors in that)

Only going by behavior shown, I suspect the % of the directory that `target/` takes up is being rounded to a flat 100%, causing the render to exclude the other files.

Contributor guide

Open the contributing guide

Research direction

Reproduce the discrepancy in diskonaut with a directory like the shown shader_brot example, comparing its output with ncdu. Trace the rendering path for the directory percentage and the small-files marker; done means the non-target files remain visible when target/ occupies nearly all of the space.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.