Bugzilla – Attachment 3464 Details for
Bug 3248
SFTP can not sort files by modification time
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
tweaked patch
bz3248.diff (text/plain), 710 bytes, created by
Damien Miller
on 2021-01-08 13:39:19 AEDT
(
hide
)
Description:
tweaked patch
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2021-01-08 13:39:19 AEDT
Size:
710 bytes
patch
obsolete
>diff --git a/sftp.c b/sftp.c >index 8c3fe96..f217098 100644 >--- a/sftp.c >+++ b/sftp.c >@@ -867,9 +867,12 @@ sglob_comp(const void *aa, const void *bb) > #define NCMP(a,b) (a == b ? 0 : (a < b ? 1 : -1)) > if (sort_flag & LS_NAME_SORT) > return (rmul * strcmp(ap, bp)); >- else if (sort_flag & LS_TIME_SORT) >- return (rmul * timespeccmp(&as->st_mtim, &bs->st_mtim, <)); >- else if (sort_flag & LS_SIZE_SORT) >+ else if (sort_flag & LS_TIME_SORT) { >+ if (timespeccmp(&as->st_mtim, &bs->st_mtim, ==)) >+ return 0; >+ return timespeccmp(&as->st_mtim, &bs->st_mtim, <) ? >+ rmul : -rmul; >+ } else if (sort_flag & LS_SIZE_SORT) > return (rmul * NCMP(as->st_size, bs->st_size)); > > fatal("Unknown ls sort type");
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 3248
:
3463
| 3464