From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7509 invoked from network); 29 Dec 2008 03:41:32 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) 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.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 29 Dec 2008 03:41:32 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 5032 invoked from network); 29 Dec 2008 03:41:27 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 Dec 2008 03:41:27 -0000 Received: (qmail 11778 invoked by alias); 29 Dec 2008 03:41:21 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26184 Received: (qmail 11767 invoked from network); 29 Dec 2008 03:41:20 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 29 Dec 2008 03:41:20 -0000 Received: from cork.scru.org (cork.scru.org [209.20.67.2]) by bifrost.dotsrc.org (Postfix) with ESMTPS id C206C80308BE for ; Mon, 29 Dec 2008 04:41:17 +0100 (CET) Received: by cork.scru.org (Postfix, from userid 1000) id 527AC104A37; Mon, 29 Dec 2008 03:41:15 +0000 (UTC) Date: Mon, 29 Dec 2008 03:41:14 +0000 From: Clint Adams To: Vincent Lefevre , 510038@bugs.debian.org Cc: zsh-workers@sunsite.dk Subject: Re: Bug#510038: zsh: glob qualifer - doesn't work correctly on dangling symlinks Message-ID: <20081229034114.GA1911@scru.org> Mail-Followup-To: Vincent Lefevre , 510038@bugs.debian.org, zsh-workers@sunsite.dk References: <20081228214141.GA7972@ay.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081228214141.GA7972@ay.vinc17.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: ClamAV 0.92.1/8805/Sun Dec 28 13:19:37 2008 on bifrost X-Virus-Status: Clean On Sun, Dec 28, 2008 at 10:41:41PM +0100, Vincent Lefevre wrote: > The glob qualifer - doesn't work correctly on dangling symlinks. > For instance: > > $ zsh < set -ex > echo $ZSH_VERSION > mkdir globtest-dir > cd globtest-dir > touch file1 > chmod 644 file1 > ln -s file1 file2 > ln -s file0 file3 > ls -l file* > ls -l file*(-W) > EOF > > gives: > > +zsh:2> echo 4.3.6 > 4.3.6 > +zsh:3> mkdir globtest-dir > +mkdir:0> mkdir globtest-dir > +zsh:4> cd globtest-dir > +zsh:5> touch file1 > +zsh:6> chmod 644 file1 > +zsh:7> ln -s file1 file2 > +ln:0> ln -s file1 file2 > +zsh:8> ln -s file0 file3 > +ln:0> ln -s file0 file3 > +zsh:9> ls -l file1 file2 file3 > -rw-r--r-- 1 lefevre lefevre 0 2008-12-28 22:34:28 file1 > lrwxrwxrwx 1 lefevre lefevre 5 2008-12-28 22:34:28 file2 -> file1 > lrwxrwxrwx 1 lefevre lefevre 5 2008-12-28 22:34:28 file3 -> file0 > +zsh:10> ls -l file3 > lrwxrwxrwx 1 lefevre lefevre 5 2008-12-28 22:34:28 file3 -> file0 > > file*(-W) should have no matches. > > zsh 4.3.9 on my Mac OS X machine behaves correctly. Are you sure? Is the stat() call succeeding on MacOS even if the link is dangling?