* PATCH: Fix double unmeta in rm verification
@ 2015-02-08 5:53 Mikael Magnusson
0 siblings, 0 replies; only message in thread
From: Mikael Magnusson @ 2015-02-08 5:53 UTC (permalink / raw)
To: zsh-workers
nicezputs already unmetas the string, resulting in corruption of the output,
% rm foo/*
zsh: sure you want to delete all the files in /.../オ\M-c\M-\nジ\M-c^D\M-c\M-^Kサウ\M-c\M-^S\M-c\t\M-c^H\M-c\M-\t\M-c\M-#ク/foo [yn]? n
Weirdly, it doesn't happen in these cases,
% rm *
zsh: sure you want to delete all the files in /.../オリジナルサウンドトラック [yn]? n
% rm オリジナルサウンドトラック/*
zsh: sure you want to delete all the files in /.../オリジナルサウンドトラック [yn]? n
And this suggests that the meta state is not entirely consistent,
% mkcd オリジナルサウンドトラック
% rm オリジナルサウンドトラック/*
zsh: sure you want to delete all the files in /.../オ\M-c\M-\nジ\M-c^D\M-c\M-^Kサウ\M-c\M-^S\M-c\t\M-c^H\M-c\M-\t\M-c\M-#ク/オリジナルサウンドトラック [yn]? n
It might be less weird if I read the surrounding code, which I haven't,
but this change seems obviously correct anyway. All four above cases
now work.
---
Src/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Src/utils.c b/Src/utils.c
index 47d9944..702829c 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -2460,7 +2460,7 @@ checkrmall(char *s)
return 1;
fprintf(shout, "zsh: sure you want to delete all the files in ");
if (*s != '/') {
- nicezputs(pwd[1] ? unmeta(pwd) : "", shout);
+ nicezputs(pwd[1] ? pwd : "", shout);
fputc('/', shout);
}
nicezputs(s, shout);
--
2.2.0.GIT
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-02-08 5:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-08 5:53 PATCH: Fix double unmeta in rm verification Mikael Magnusson
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).