From 5ee05cf9353b36e2dbe4149717ec239d074d1f21 Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Tue, 26 Apr 2016 10:40:56 -0700 Subject: 38350 (cf. Glenn Smith: 38348): Remove-all warning should warn about the root directory as well --- Src/exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Src') diff --git a/Src/exec.c b/Src/exec.c index 50eff72cb..2dcd5bcf5 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -2902,11 +2902,11 @@ execcmd(Estate state, int input, int output, int how, int last1) if (s[0] == Star && !s[1]) { if (!checkrmall(pwd)) uremnode(args, node); - } else if (l > 2 && s[l - 2] == '/' && s[l - 1] == Star) { + } else if (l >= 2 && s[l - 2] == '/' && s[l - 1] == Star) { char t = s[l - 2]; s[l - 2] = 0; - if (!checkrmall(s)) + if (!checkrmall(*s ? s : "/")) uremnode(args, node); s[l - 2] = t; } -- cgit 1.4.1