diff options
author | Daniel Milde <daniel@milde.cz> | 2021-11-07 23:08:47 +0100 |
---|---|---|
committer | Daniel Milde <daniel@milde.cz> | 2021-11-07 23:08:47 +0100 |
commit | 8edb037d8365744a8d8ac9a27f83ceee04bf16dd (patch) | |
tree | d24d13a513ce81dfb932097755110a3bd8d990b9 /stdout | |
parent | 4dfbeded97cb39619896d4d1fb5e4b795b8962ee (diff) |
show info about hard-linked files
closes #95
Diffstat (limited to 'stdout')
-rw-r--r-- | stdout/stdout.go | 4 | ||||
-rw-r--r-- | stdout/stdout_test.go | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/stdout/stdout.go b/stdout/stdout.go index ab627c5..9be08eb 100644 --- a/stdout/stdout.go +++ b/stdout/stdout.go @@ -142,6 +142,7 @@ func (ui *UI) AnalyzePath(path string, _ *analyze.Dir) error { defer wait.Done() defer debug.SetGCPercent(debug.SetGCPercent(-1)) dir = ui.Analyzer.AnalyzeDir(path, ui.CreateIgnoreFunc()) + dir.UpdateStats(make(analyze.HardLinkedItems, 10)) }() wait.Wait() @@ -246,8 +247,7 @@ func (ui *UI) ReadAnalysis(input io.Reader) error { } runtime.GC() - links := make(analyze.AlreadyCountedHardlinks, 10) - dir.UpdateStats(links) + dir.UpdateStats(make(analyze.HardLinkedItems, 10)) if ui.ShowProgress { doneChan <- struct{}{} diff --git a/stdout/stdout_test.go b/stdout/stdout_test.go index 89a86fc..5441441 100644 --- a/stdout/stdout_test.go +++ b/stdout/stdout_test.go @@ -109,8 +109,6 @@ func TestItemRows(t *testing.T) { err := ui.AnalyzePath("test_dir", nil) assert.Nil(t, err) - assert.Contains(t, output.String(), "GiB") - assert.Contains(t, output.String(), "MiB") assert.Contains(t, output.String(), "KiB") } |