projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a6755f
)
grep: fix combination of -r and -h
author
Denis Vlasenko
<vda.linux@googlemail.com>
Sat, 14 Oct 2006 14:51:59 +0000
(14:51 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Sat, 14 Oct 2006 14:51:59 +0000
(14:51 -0000)
findutils/grep.c
patch
|
blob
|
history
diff --git
a/findutils/grep.c
b/findutils/grep.c
index 1285d21f844edf1f765becd8f74dce6fc58119ca..12cad34aafb3416871c0d35259ab9612cc62be45 100644
(file)
--- a/
findutils/grep.c
+++ b/
findutils/grep.c
@@
-430,7
+430,8
@@
int grep_main(int argc, char **argv)
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;
}