1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-05-20 06:56:05 +02:00

38350 (cf. Glenn Smith: 38348): Remove-all warning should warn about the root directory as well

This commit is contained in:
Barton E. Schaefer 2016-04-26 10:40:56 -07:00
parent 442d702bbc
commit 5ee05cf935
2 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -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;
}