grep: fix "grep -r PATTRN SYMLINK_TO_DIR"

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2014-08-28 15:50:09 +02:00
parent 6ff0551157
commit 34cc6c91a2
2 changed files with 21 additions and 1 deletions

View File

@@ -668,7 +668,7 @@ static int grep_dir(const char *dir)
int matched = 0;
recursive_action(dir,
/* recurse=yes */ ACTION_RECURSE |
/* followLinks=no */
/* followLinks=command line only */ ACTION_FOLLOWLINKS_L0 |
/* depthFirst=yes */ ACTION_DEPTHFIRST,
/* fileAction= */ file_action_grep,
/* dirAction= */ NULL,