From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23054 invoked from network); 22 Oct 2007 09:20:02 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 22 Oct 2007 09:20:02 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 59036 invoked from network); 22 Oct 2007 09:19:53 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 22 Oct 2007 09:19:53 -0000 Received: (qmail 10179 invoked by alias); 22 Oct 2007 09:19:50 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 24006 Received: (qmail 10155 invoked from network); 22 Oct 2007 09:19:49 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 22 Oct 2007 09:19:49 -0000 Received: (qmail 58723 invoked from network); 22 Oct 2007 09:19:49 -0000 Received: from cluster-d.mailcontrol.com (217.69.20.190) by a.mx.sunsite.dk with SMTP; 22 Oct 2007 09:19:41 -0000 Received: from rly16d.srv.mailcontrol.com (localhost.localdomain [127.0.0.1]) by rly16d.srv.mailcontrol.com (MailControl) with ESMTP id l9M9JYih006177 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 22 Oct 2007 10:19:38 +0100 Received: from submission.mailcontrol.com (submission.mailcontrol.com [86.111.216.190]) by rly16d.srv.mailcontrol.com (MailControl) id l9M9JJbR004757 for zsh-workers@sunsite.dk; Mon, 22 Oct 2007 10:19:19 +0100 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly16d-eth0.srv.mailcontrol.com (envelope-sender Peter.Stephenson@csr.com) (MIMEDefang) with ESMTP id l9M9IiZh002749; Mon, 22 Oct 2007 10:19:19 +0100 (BST) Received: from news01 ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Mon, 22 Oct 2007 10:17:58 +0100 Date: Mon, 22 Oct 2007 10:17:58 +0100 From: Peter Stephenson To: zsh-workers@sunsite.dk Cc: Georg Neis , 353607@bugs.debian.org Subject: Re: Bug#353607: Related problem? Message-ID: <20071022101758.349d39a2@news01> In-Reply-To: <20071019195245.GA26919@scowler.net> References: <200710192118.22845.gn@oglaroon.de> <20071019195245.GA26919@scowler.net> Organization: CSR X-Mailer: Claws Mail 3.0.2 (GTK+ 2.10.14; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-OriginalArrivalTime: 22 Oct 2007 09:17:58.0994 (UTC) FILETIME=[702B9320:01C8148C] X-Scanned-By: MailControl A-07-08-10 (www.mailcontrol.com) on 10.68.1.126 On Fri, 19 Oct 2007 15:52:45 -0400 Clint Adams wrote: > On Fri, Oct 19, 2007 at 09:18:22PM +0200, Georg Neis wrote: > > traal% ls -a > > ./ ../ > > traal% mkdir a b > > traal% touch a/1 b/1 > > traal% print -l *(F) > > a > > b > > traal% mv a =C3=A0 > > traal% print -l *(F) > > b We don't unmetafy strings passed down to glob qualifier functions. This appears to be correct in some cases (where the name is passed into shell code for further processing), so it seems we need to do this within qualnonemptydir(). (I left the first hunk in as it's a little neater but it has no effect.) Index: Src/glob.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/zsh/zsh/Src/glob.c,v retrieving revision 1.59 diff -u -r1.59 glob.c --- Src/glob.c 18 Jun 2007 13:25:05 -0000 1.59 +++ Src/glob.c 22 Oct 2007 09:15:07 -0000 @@ -326,7 +326,8 @@ /* Reject the file if the function returned zero * * and the sense was positive (sense&1 =3D=3D 0), or * * vice versa. */ - if ((!((qn->func) (news, bp, qn->data, qn->sdata)) ^ qn->sense) & 1) { + if ((!((qn->func) (news, bp, qn->data, qn->sdata)) + ^ qn->sense) & 1) { /* Try next alternative, or return if there are no more */ if (!(qo =3D qo->or)) { unqueue_signals(); @@ -3254,6 +3255,8 @@ { DIR *dirh; struct dirent *de; + int unamelen; + char *uname =3D unmetafy(dupstring(name), &unamelen); =20 if (!S_ISDIR(buf->st_mode)) return 0; @@ -3261,7 +3264,7 @@ if (buf->st_nlink > 2) return 1; =20 - if (!(dirh =3D opendir(name))) + if (!(dirh =3D opendir(uname))) return 0; =20 while ((de =3D readdir(dirh))) { --=20 Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070