[PR #518] [MERGED] Fix multi-paths output when depth is 0 #524

Closed
opened 2026-06-08 11:29:05 +03:00 by zhus · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bootandy/dust/pull/518
Author: @Coekjan
Created: 7/11/2025
Status: Merged
Merged: 7/29/2025
Merged by: @bootandy

Base: masterHead: fix-depth0-multi-paths


📝 Commits (1)

  • 9cdb7c3 Fix multi-paths output when depth is 0

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 src/filter.rs (+2 -1)

📄 Description

Today I met a small bug introduced at 74ffd78901 . When I run dust -d0 -c -B path1 path2 ..., the previous released version prints something like:

12K   ┌── test_dir │                                                 ██████████████████████████ │  33%
24K   ├── test_dir2│                        ███████████████████████████████████████████████████ │  67%
36K ┌─┴ (total)    │███████████████████████████████████████████████████████████████████████████ │ 100%

Current latest version turns to display something like (only total, no other lines):

36K ┌── (total)│███████████████████████████████████████████████████████████████████████████████ │ 100%

The bug comes from 74ffd78901 , which seems to accidently remove the line:

heap = always_add_children(&display_data, &root, heap);

and let the program fall to

heap = add_children(&display_data, &root, heap);

and finally lead to regression.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bootandy/dust/pull/518 **Author:** [@Coekjan](https://github.com/Coekjan) **Created:** 7/11/2025 **Status:** ✅ Merged **Merged:** 7/29/2025 **Merged by:** [@bootandy](https://github.com/bootandy) **Base:** `master` ← **Head:** `fix-depth0-multi-paths` --- ### 📝 Commits (1) - [`9cdb7c3`](https://github.com/bootandy/dust/commit/9cdb7c3da60543a4c03f7a7825210089f4804c5e) Fix multi-paths output when `depth` is `0` ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/filter.rs` (+2 -1) </details> ### 📄 Description Today I met a small bug introduced at 74ffd7890194bf850b75dc4ff0fd72ce358c8a00 . When I run `dust -d0 -c -B path1 path2 ...`, the previous released version prints something like: ```plaintext 12K ┌── test_dir │ ██████████████████████████ │ 33% 24K ├── test_dir2│ ███████████████████████████████████████████████████ │ 67% 36K ┌─┴ (total) │███████████████████████████████████████████████████████████████████████████ │ 100% ``` Current latest version turns to display something like (only total, no other lines): ```plaintext 36K ┌── (total)│███████████████████████████████████████████████████████████████████████████████ │ 100% ``` The bug comes from 74ffd7890194bf850b75dc4ff0fd72ce358c8a00 , which seems to accidently remove the line: ```rs heap = always_add_children(&display_data, &root, heap); ``` and let the program fall to ```rs heap = add_children(&display_data, &root, heap); ``` and finally lead to regression. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
zhus added the pull-request label 2026-06-08 11:29:05 +03:00
zhus closed this issue 2026-06-08 11:29:06 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#524