about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2020-07-03 13:38:58 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2020-07-05 11:11:59 +0000
commitcf134c15a09c9be7fac7628372a8f897ec84f9fa (patch)
tree53e43a574e37f0eb4d0da2d69c7db4fccee41acd
parentb58141c4cfa6fe6c0734d83e789529ae3f920b1f (diff)
downloadzsh-cf134c15a09c9be7fac7628372a8f897ec84f9fa.tar.gz
zsh-cf134c15a09c9be7fac7628372a8f897ec84f9fa.tar.xz
zsh-cf134c15a09c9be7fac7628372a8f897ec84f9fa.zip
46175/0003: Fix the RM_STAR_SILENT bug from the parent commit.
-rw-r--r--ChangeLog3
-rw-r--r--Src/exec.c2
-rw-r--r--Test/E01options.ztst2
3 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 51c7fc00b..f0c4a9f5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2020-07-05  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
+	* 46175/0003: Src/exec.c, Test/E01options.ztst: Fix the
+	RM_STAR_SILENT bug from the parent commit.
+
 	* 46175/0002: Test/E01options.ztst: Add a regression test for
 	46169: the RM_STAR_SILENT logic processes the current directory
 	rather than the root directory.
diff --git a/Src/exec.c b/Src/exec.c
index 045b5d2b9..7120a2c34 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -3401,7 +3401,7 @@ execcmd_exec(Estate state, Execcmd_params eparams,
 		int rmall;
 
 		s[l - 2] = 0;
-		rmall = checkrmall(s);
+		rmall = checkrmall(l == 2 ? "/" : s);
 		s[l - 2] = t;
 
 		if (!rmall) {
diff --git a/Test/E01options.ztst b/Test/E01options.ztst
index 053affeed..c59509f2e 100644
--- a/Test/E01options.ztst
+++ b/Test/E01options.ztst
@@ -1447,6 +1447,6 @@ F:If this test fails at the first unsetopt, refer to P01privileged.ztst.
     ZTST_skip="the zsh/zpty module is not available"
   fi
   BEL=$'\a'
-0qf:RM_STAR_SILENT
+0q:RM_STAR_SILENT
 *>zsh: sure you want to delete all 15 files in ${PWD:h}/options.tmp \[yn\]\? ${BEL}
 *>zsh: sure you want to delete all <-> files in / \[yn\]\? ${BEL}