summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/exec.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 03eba5fcc..b8eba08f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-04-26  Barton E. Schaefer  <schaefer@zsh.org>
+
+	* 38350 (cf. Glenn Smith: 38348): Src/exec.c: Remove-all warning
+	should warn about the root directory as well
+
 2016-04-23  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
 	* 38316: Completion/Unix/Command/_git: _git-rebase: Complete
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;
 	    }