Skip to content

Commit 4dab623

Browse files
authored
Merge pull request ogham#516 from VichoReyes/dothidden
Include symlinks to dirs when grouping dirs
2 parents e198cac + 69a7e53 commit 4dab623

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/fs/filter.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ impl FileFilter {
129129
if self.list_dirs_first {
130130
// This relies on the fact that `sort_by` is *stable*: it will keep
131131
// adjacent elements next to each other.
132-
files.sort_by(|a, b| b.as_ref().is_directory().cmp(&a.as_ref().is_directory()));
132+
files.sort_by(|a, b| {b.as_ref().points_to_directory()
133+
.cmp(&a.as_ref().points_to_directory())
134+
});
133135
}
134136
}
135137
}

0 commit comments

Comments
 (0)