feat: Handle duplicate dir names better

If we run `dust /usr/*/Trash`
We see several 'Trash' directories in the output but do not know which
user they belong to.

This fix means if we see duplicate names in a directory we will display
the parent directory name as well
This commit is contained in:
andy.boot
2025-02-05 20:28:17 +00:00
parent a962b80eec
commit 137e366eca
6 changed files with 83 additions and 2 deletions
+1 -1
View File
@@ -273,7 +273,7 @@ fn clean_indentation_string(s: &str) -> String {
is
}
fn get_printable_name<P: AsRef<Path>>(dir_name: &P, short_paths: bool) -> String {
pub fn get_printable_name<P: AsRef<Path>>(dir_name: &P, short_paths: bool) -> String {
let dir_name = dir_name.as_ref();
let printable_name = {
if short_paths {