[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [PATCH 2 of 2] grep: -r should recurse into symlinks to directories
From:       Thomas De Schampheleire <patrickdepinguin () gmail ! com>
Date:       2014-07-29 8:45:13
Message-ID: 8c87fa8591bed69e20ce.1406623513 () localhost
[Download RAW message or body]

The command
    grep -r . symlink_to_dir
should recurse into the directory pointed to by symlink_to_dir.
This patch fixes grep to implement this case.
This also fixes the newly added test in the testsuite.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---
 findutils/grep.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff -r 66406add5e60 -r 8c87fa8591be findutils/grep.c
--- a/findutils/grep.c	Mon Jul 28 16:33:41 2014 +0200
+++ b/findutils/grep.c	Mon Jul 28 16:38:36 2014 +0200
@@ -668,7 +668,7 @@
 	int matched = 0;
 	recursive_action(dir,
 		/* recurse=yes */ ACTION_RECURSE |
-		/* followLinks=no */
+		/* followLinks=yes */ ACTION_FOLLOWLINKS |
 		/* depthFirst=yes */ ACTION_DEPTHFIRST,
 		/* fileAction= */ file_action_grep,
 		/* dirAction= */ NULL,
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic