solidiquis / erdtree

A modern, cross-platform, multi-threaded, and general purpose filesystem and disk-usage utility that is aware of .gitignore and hidden file rules.
https://crates.io/crates/erdtree
MIT License
2.36k stars 63 forks source link

Flat Layout Sorting Fix #234

Open siqpush opened 1 year ago

siqpush commented 1 year ago

224

Issue Sort is displayed with respect to tree structure

Cause Flat Layouts (iflat, flat) are created downstream of their file tree build (sorting is done during the build).

Fix Have the tree build reflect a flat layout by only appending nodes to the root if the user specifies a flat layout. Sorting (if applicable) for flat layouts had to be moved out of multi-threaded section to ensure comparisons are made against the result of all threads.

Test Fix Flat tests to reflect new output