Merge pull request #516 from VichoReyes/dothidden

Include symlinks to dirs when grouping dirs
This commit is contained in:
Benjamin Sago 2020-01-19 00:16:06 +00:00 committed by GitHub
commit 4dab6237f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -129,7 +129,9 @@ impl FileFilter {
if self.list_dirs_first {
// This relies on the fact that `sort_by` is *stable*: it will keep
// adjacent elements next to each other.
files.sort_by(|a, b| b.as_ref().is_directory().cmp(&a.as_ref().is_directory()));
files.sort_by(|a, b| {b.as_ref().points_to_directory()
.cmp(&a.as_ref().points_to_directory())
});
}
}
}