svn commit: trunk/busybox/findutils

vda at busybox.net vda at busybox.net
Sat Oct 14 14:52:00 UTC 2006


Author: vda
Date: 2006-10-14 07:51:59 -0700 (Sat, 14 Oct 2006)
New Revision: 16382

Log:
grep: fix combination of -r and -h


Modified:
   trunk/busybox/findutils/grep.c


Changeset:
Modified: trunk/busybox/findutils/grep.c
===================================================================
--- trunk/busybox/findutils/grep.c	2006-10-14 14:24:30 UTC (rev 16381)
+++ trunk/busybox/findutils/grep.c	2006-10-14 14:51:59 UTC (rev 16382)
@@ -430,7 +430,8 @@
 			if (option_mask32 & GREP_OPT_r) {
 				struct stat st;
 				if (stat(cur_file, &st) == 0 && S_ISDIR(st.st_mode)) {
-					print_filename = 1;
+					if (!(option_mask32 & GREP_OPT_h))
+						print_filename = 1;
 					matched += grep_dir(cur_file);
 					goto grep_done;
 				}




More information about the busybox-cvs mailing list