[BusyBox-cvs] busybox.stable find.c,1.34,1.35

Erik Andersen andersen at codepoet.org
Wed Dec 11 22:03:37 UTC 2002


Update of /var/cvs/busybox.stable
In directory winder:/tmp/cvs-serv27046

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


Index: find.c
===================================================================
RCS file: /var/cvs/busybox.stable/find.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- find.c	28 Feb 2002 05:24:24 -0000	1.34
+++ find.c	11 Dec 2002 22:03:34 -0000	1.35
@@ -82,13 +82,13 @@
 	}
 #endif
 #ifdef BB_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