[BusyBox-cvs] busybox/findutils find.c,1.35,1.36

Glenn McGrath bug1 at busybox.net
Wed Dec 11 21:22:24 UTC 2002


Update of /var/cvs/busybox/findutils
In directory winder:/tmp/cvs-serv24912/findutils

Modified Files:
	find.c 
Log Message:
Fix -mtime, by Ian Abbott


Index: find.c
===================================================================
RCS file: /var/cvs/busybox/findutils/find.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- find.c	24 Jul 2002 00:34:48 -0000	1.35
+++ find.c	11 Dec 2002 21:22:21 -0000	1.36
@@ -84,13 +84,13 @@
 	}
 #endif
 #ifdef CONFIG_FEATURE_FIND_MTIME
-	if (mtime_days != 0) {
+	if (mtime_char != 0) {
 		time_t file_age = time(NULL) - statbuf->st_mtime;
 		time_t mtime_secs = mtime_days * 24 * 60 * 60;
-		if (!((isdigit(mtime_char) && mtime_secs >= file_age &&
-						mtime_secs < file_age + 24 * 60 * 60) ||
-				(mtime_char == '+' && mtime_secs >= file_age) || 
-				(mtime_char == '-' && mtime_secs < file_age)))
+		if (!((isdigit(mtime_char) && file_age >= mtime_secs &&
+						file_age < mtime_secs + 24 * 60 * 60) ||
+				(mtime_char == '+' && file_age >= mtime_secs + 24 * 60 * 60) || 
+				(mtime_char == '-' && file_age < mtime_secs)))
 			goto no_match;
 	}
 #endif




More information about the busybox-cvs mailing list