From 5131a2bc6d5c577b2fe86f74fc73f283306c0f02 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 29 Apr 2025 12:21:18 -0500 Subject: [PATCH] Don't wildcard expand . and .. --- toys/pending/sh.c | 1 + 1 file changed, 1 insertion(+) diff --git a/toys/pending/sh.c b/toys/pending/sh.c index 9d2145c1..ba54ce3b 100644 --- a/toys/pending/sh.c +++ b/toys/pending/sh.c @@ -1692,6 +1692,7 @@ int do_wildcard_files(struct dirtree *node) // Top level entry has no pattern in it if (!node->parent) return DIRTREE_RECURSE; + if (!dirtree_notdotdot(node)) return 0; // Find active pattern range for (nn = node->parent; nn; nn = nn->parent) if (nn->parent) ii++; -- 2.39.5