mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:17:35 +00:00
ls: Fix incorrect -t sort order
Dr. POSIX says -t should sort the output by mtime ascending.
This commit is contained in:
parent
6830963321
commit
7997c02b6c
1 changed files with 2 additions and 2 deletions
|
@ -398,8 +398,8 @@ static int do_file_system_object_long(const char* path)
|
|||
quick_sort(files, [](auto& a, auto& b) {
|
||||
if (flag_sort_by_timestamp) {
|
||||
if (flag_reverse_sort)
|
||||
return a.stat.st_mtime > b.stat.st_mtime;
|
||||
return a.stat.st_mtime < b.stat.st_mtime;
|
||||
return a.stat.st_mtime < b.stat.st_mtime;
|
||||
return a.stat.st_mtime > b.stat.st_mtime;
|
||||
}
|
||||
// Fine, sort by name then!
|
||||
if (flag_reverse_sort)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue