diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-14 14:51:59 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-14 14:51:59 +0000 |
commit | 3544ae60047f9bb94d5ce8c699c9c2b444a73f35 (patch) | |
tree | c9c1546fece532364f581f9a9baec7627d9ad604 | |
parent | 3a6755f56f811f246934f02182531fb1e8ccc72d (diff) | |
download | busybox-w32-3544ae60047f9bb94d5ce8c699c9c2b444a73f35.tar.gz busybox-w32-3544ae60047f9bb94d5ce8c699c9c2b444a73f35.tar.bz2 busybox-w32-3544ae60047f9bb94d5ce8c699c9c2b444a73f35.zip |
grep: fix combination of -r and -h
-rw-r--r-- | findutils/grep.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/findutils/grep.c b/findutils/grep.c index 1285d21f8..12cad34aa 100644 --- a/findutils/grep.c +++ b/findutils/grep.c | |||
@@ -430,7 +430,8 @@ int grep_main(int argc, char **argv) | |||
430 | if (option_mask32 & GREP_OPT_r) { | 430 | if (option_mask32 & GREP_OPT_r) { |
431 | struct stat st; | 431 | struct stat st; |
432 | if (stat(cur_file, &st) == 0 && S_ISDIR(st.st_mode)) { | 432 | if (stat(cur_file, &st) == 0 && S_ISDIR(st.st_mode)) { |
433 | print_filename = 1; | 433 | if (!(option_mask32 & GREP_OPT_h)) |
434 | print_filename = 1; | ||
434 | matched += grep_dir(cur_file); | 435 | matched += grep_dir(cur_file); |
435 | goto grep_done; | 436 | goto grep_done; |
436 | } | 437 | } |