[GH-ISSUE #41] Incorrect position of folder where prefix is identical to filename #17

Closed
opened 2026-06-08 11:25:18 +03:00 by zhus · 3 comments
Owner

Originally created by @b-hahn on GitHub (Dec 4, 2019).
Original GitHub issue: https://github.com/bootandy/dust/issues/41

Thanks for the nice work on dust!

I ran into an issue on Ubuntu 18.04 where I have a folder called folder.bag.map and a file called file.bag. The resulting dust output when run in the parent folder is:

user:~/developer/$ dust
  62G ─┬ .
  19G  ├─┬ file.bag
 179M  │ └─┬ folder.bag.map
 119M  │   ├─┬ subfolder1
 119M  │   | └── file1.txt
  59M  │   └─┬ subfolder2
  38M  │     └── file2.txt

i.e. it seems like the file file.bag is treated like a folder and folder.bag.map is treated as a subfolder of the file. Maybe there's a parsing issue here somewhere?

Originally created by @b-hahn on GitHub (Dec 4, 2019). Original GitHub issue: https://github.com/bootandy/dust/issues/41 Thanks for the nice work on dust! I ran into an issue on Ubuntu 18.04 where I have a folder called folder.bag.map and a file called file.bag. The resulting dust output when run in the parent folder is: ```bash user:~/developer/$ dust 62G ─┬ . 19G ├─┬ file.bag 179M │ └─┬ folder.bag.map 119M │ ├─┬ subfolder1 119M │ | └── file1.txt 59M │ └─┬ subfolder2 38M │ └── file2.txt ``` i.e. it seems like the file file.bag is treated like a folder and folder.bag.map is treated as a subfolder of the file. Maybe there's a parsing issue here somewhere?
zhus closed this issue 2026-06-08 11:25:18 +03:00
Author
Owner

@bootandy commented on GitHub (Dec 5, 2019):

Hi,

If you mean the file is called 'folder.bag' so it is a substring of the folder name 'folder.bag.map' then I can reproduce this.

$ target/debug/dust ~/tmp                                                                                                        [21:01:24]
  16K ─┬ tmp
 4.0K  ├── file.bag
 4.0K  └─┬ folder.bag
 4.0K       └─┬ folder.bag.mat
   0B             └── hello

I can not reproduce this with a file called 'file.bag' at the same level as a folder called 'folder.bag.map'

Can I ask which version of dust you are running (dust --version) - If there is no output it is old as it is pre 0.4.

<!-- gh-comment-id:561838353 --> @bootandy commented on GitHub (Dec 5, 2019): Hi, If you mean the file is called 'folder.bag' so it is a substring of the folder name 'folder.bag.map' then I can reproduce this. ``` $ target/debug/dust ~/tmp [21:01:24] 16K ─┬ tmp 4.0K ├── file.bag 4.0K └─┬ folder.bag 4.0K └─┬ folder.bag.mat 0B └── hello ``` I can not reproduce this with a file called 'file.bag' at the same level as a folder called 'folder.bag.map' Can I ask which version of dust you are running (dust --version) - If there is no output it is old as it is pre 0.4.
Author
Owner

@bootandy commented on GitHub (Dec 5, 2019):

I thought this was fixed with:
https://github.com/bootandy/dust/commit/6e03dd77e61d7a479e653dc5e5031372f05fe0c8
but I was clearly wrong

<!-- gh-comment-id:561838864 --> @bootandy commented on GitHub (Dec 5, 2019): I thought this was fixed with: https://github.com/bootandy/dust/commit/6e03dd77e61d7a479e653dc5e5031372f05fe0c8 but I was clearly wrong
Author
Owner

@bootandy commented on GitHub (Dec 5, 2019):

I think this commit reintroduced this bug : db6c8a0

<!-- gh-comment-id:561840790 --> @bootandy commented on GitHub (Dec 5, 2019): I think this commit reintroduced this bug : db6c8a0
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#17