Fix a bug such that if you enabled sorting by size (-S) and enabled a
flag to use a time other than modtime (-c, -u, or -U), the output would actually be sorted by the specified time rather than size. This does alter the behavior in the case where both -S and -t are specified. Now, -S is always preferred. Previously, -t was preferred if one of -c, -u, or -U was specified, and -S was preferred otherwise. Perhaps -S and -t should override each other (last one specified wins).
This commit is contained in:
parent
bea12be630
commit
86cca1e75e
@ -416,27 +416,27 @@ main(int argc, char *argv[])
|
||||
if (f_reversesort) {
|
||||
if (!f_timesort && !f_sizesort)
|
||||
sortfcn = revnamecmp;
|
||||
else if (f_sizesort)
|
||||
sortfcn = revsizecmp;
|
||||
else if (f_accesstime)
|
||||
sortfcn = revacccmp;
|
||||
else if (f_birthtime)
|
||||
sortfcn = revbirthcmp;
|
||||
else if (f_statustime)
|
||||
sortfcn = revstatcmp;
|
||||
else if (f_sizesort)
|
||||
sortfcn = revsizecmp;
|
||||
else /* Use modification time. */
|
||||
sortfcn = revmodcmp;
|
||||
} else {
|
||||
if (!f_timesort && !f_sizesort)
|
||||
sortfcn = namecmp;
|
||||
else if (f_sizesort)
|
||||
sortfcn = sizecmp;
|
||||
else if (f_accesstime)
|
||||
sortfcn = acccmp;
|
||||
else if (f_birthtime)
|
||||
sortfcn = birthcmp;
|
||||
else if (f_statustime)
|
||||
sortfcn = statcmp;
|
||||
else if (f_sizesort)
|
||||
sortfcn = sizecmp;
|
||||
else /* Use modification time. */
|
||||
sortfcn = modcmp;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user