mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 20:17:45 +00:00
feat2: Rebased on current master and incorporated changes done to the filetype handling.
This commit is contained in:
parent
9c221148a8
commit
43f3f7e01c
1 changed files with 4 additions and 3 deletions
|
@ -1165,9 +1165,10 @@ fn sort_entries(entries: &mut Vec<PathData>, config: &Config) {
|
||||||
Sort::Name => entries.sort_by_cached_key(|k| k.file_name.to_lowercase()),
|
Sort::Name => entries.sort_by_cached_key(|k| k.file_name.to_lowercase()),
|
||||||
Sort::Version => entries.sort_by(|k, j| version_cmp::version_cmp(&k.p_buf, &j.p_buf)),
|
Sort::Version => entries.sort_by(|k, j| version_cmp::version_cmp(&k.p_buf, &j.p_buf)),
|
||||||
Sort::Extension => entries.sort_by(|a, b| {
|
Sort::Extension => entries.sort_by(|a, b| {
|
||||||
a.extension()
|
a.p_buf
|
||||||
.cmp(&b.extension())
|
.extension()
|
||||||
.then(a.file_stem().cmp(&b.file_stem()))
|
.cmp(&b.p_buf.extension())
|
||||||
|
.then(a.p_buf.file_stem().cmp(&b.p_buf.file_stem()))
|
||||||
}),
|
}),
|
||||||
Sort::None => {}
|
Sort::None => {}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue