mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-30 20:47:46 +00:00
Merge pull request #1061 from Arcterus/ls-fix
ls: fix line that was forgotten in #1057
This commit is contained in:
commit
61b15f5c1c
1 changed files with 10 additions and 6 deletions
|
@ -189,7 +189,11 @@ fn sort_entries(entries: &mut Vec<PathBuf>, options: &getopts::Matches) {
|
|||
let mut reverse = options.opt_present("r");
|
||||
if options.opt_present("t") {
|
||||
if options.opt_present("c") {
|
||||
entries.sort_by_key(|k| get_metadata(k, options).map(|md| md.ctime()).unwrap_or(0));
|
||||
entries.sort_by_key(|k| {
|
||||
Reverse(get_metadata(k, options)
|
||||
.map(|md| md.ctime())
|
||||
.unwrap_or(0))
|
||||
});
|
||||
} else {
|
||||
entries.sort_by_key(|k| {
|
||||
// Newest first
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue