rcolebaugh / rpms / openssh

Forked from rpms/openssh 2 years ago
Clone
152122
diff -up openssh-8.0p1/sftp.c.original openssh-8.0p1/sftp.c
152122
--- openssh-8.0p1/sftp.c.original	2020-12-22 17:05:02.105698989 +0900
152122
+++ openssh-8.0p1/sftp.c	2020-12-22 17:05:42.922035780 +0900
152122
@@ -937,7 +937,11 @@ sglob_comp(const void *aa, const void *b
152122
 		return (rmul * strcmp(ap, bp));
152122
 	else if (sort_flag & LS_TIME_SORT) {
152122
 #if defined(HAVE_STRUCT_STAT_ST_MTIM)
152122
-		return (rmul * timespeccmp(&as->st_mtim, &bs->st_mtim, <));
152122
+		if (timespeccmp(&as->st_mtim, &bs->st_mtim, <)){
152122
+			return rmul;
152122
+		} else {
152122
+			return -rmul;
152122
+		}
152122
 #elif defined(HAVE_STRUCT_STAT_ST_MTIME)
152122
 		return (rmul * NCMP(as->st_mtime, bs->st_mtime));
152122
 #else