aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/grep.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/posix/grep.c')
-rw-r--r--toys/posix/grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/grep.c b/toys/posix/grep.c
index 2fe6ac27..a95203a0 100644
--- a/toys/posix/grep.c
+++ b/toys/posix/grep.c
@@ -313,7 +313,7 @@ static int do_grep_r(struct dirtree *new)
{
char *name;
- if (new->parent && !dirtree_notdotdot(new)) return 0;
+ if (!dirtree_notdotdot(new)) return 0;
if (S_ISDIR(new->st.st_mode)) return DIRTREE_RECURSE;
// "grep -r onefile" doesn't show filenames, but "grep -r onedir" should.