← Commit list

3544ae600

Denis Vlasenko
Denis Vlasenko
2006-10-14
FAILED Duration: 4s

Subject

grep: fix combination of -r and -h

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

findutils/grep.c+2 -1
@@ -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;
}