From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13642 invoked by alias); 8 Feb 2015 05:53:40 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 34466 Received: (qmail 13494 invoked from network); 8 Feb 2015 05:53:26 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=1Ej7DwQKNnPcX4s8oIT51j7W6ZctFMIbtg3f510pCFo=; b=W1QqBl6jDomSe3uB9fVm7ZFN8zl3zt5BvpyuWPSTta9CWtLWJS6XPg9RQXZOBEb0Qn 6BpyxycLo38H7pAVbyTDdQZ/6Cujof1S8p0MRBha/vHRdTp1wyhN4Uy2q+My8psEx7cr Izm2ZkoGjXxcAUCeo3gdy3G8FQoc3PYu8tFj68DWjYA7Xii0Vc5yOKLAeKSf29Gt5tEl EIEYTHOVJ51MjFEh2XqXv/kppdTmx+RBXgabxQVi93Fm6iOXyEoC8Hcvbpe5uuZTIu1O euiPIqjpPmaq3mPRJhPMAbHkLLK1wLSBmryIK2oOPFY3D8P9ZJGzXDwNQmAbCs1WL1sJ SlHg== X-Received: by 10.180.106.5 with SMTP id gq5mr13111043wib.34.1423374802525; Sat, 07 Feb 2015 21:53:22 -0800 (PST) From: Mikael Magnusson To: zsh-workers@zsh.org Subject: PATCH: Fix double unmeta in rm verification Date: Sun, 8 Feb 2015 06:53:14 +0100 Message-Id: <1423374794-3921-1-git-send-email-mikachu@gmail.com> X-Mailer: git-send-email 2.2.0.GIT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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