bug#71803: ls --time=mtime is sorting by name instead of mtime
From:
Pádraig Brady
Subject:
bug#71803: ls --time=mtime is sorting by name instead of mtime
Date:
Thu, 27 Jun 2024 18:51:13 +0100
User-agent:
Mozilla Thunderbird Beta
On 27/06/2024 16:05, Dave wrote:
The ls command without the -l option and with the --time=mtime option,
is incorrectly sorting by the name rather than by the modification
time.
ls # sorts by name (ok)
ls --time=mtime # sorts by name (should sort by mtime)
Right, we should be applying this GNU extension to --time=mtime also.
I.e. sorting when not displaying time (-l not specified),
and no other sorting specific option is used.
The proposed fix wouldn't work as time_mtime is the default,
so we'd be sorting by mtime rather than name by default.
I'll apply the attached later to address this.
Marking this as done.
thanks,
Pádraig