From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21724 invoked from network); 12 Nov 1998 06:23:02 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 12 Nov 1998 06:23:02 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id BAA20365; Thu, 12 Nov 1998 01:22:23 -0500 (EST) Resent-Date: Thu, 12 Nov 1998 01:22:23 -0500 (EST) Message-ID: <19981112172055.A21356@primenet.com.au> Date: Thu, 12 Nov 1998 17:20:55 +1100 From: Geoff Wing To: Zsh Hackers Subject: PATCH: 3.1.5: ``***'' symlink follow broken Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i Organization: PrimeNet Computer Consultancy Resent-Message-ID: <"F_Uxx.0.8-4.VwdIs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4607 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Heyla, ``***'' recursive globbing with symlink follow has been broken since at least 3.1.2 (maybe before): % mkdir 1 2 % ln -s ../2 1/ % echo > 2/foo % zsh-3.1.5 -fc 'echo 1/***/foo' zsh: no matches found: 1/***/foo % zsh-3.1.2 -fc 'echo 1/***/foo' zsh: no matches found: 1/***/foo % zsh-3.1.0-test3 -fc 'echo 1/***/foo' 1/2/foo % zsh-3.0.5 -fc 'echo 1/***/foo' 1/2/foo This patch is probably suboptimal (possibly wrong) and may encourage someone to make a real patch. *** Src/glob.c.org Wed Oct 14 07:51:55 1998 --- Src/glob.c Thu Nov 12 16:56:25 1998 *************** *** 351,357 **** int subdirlen = 0; fn = pathbuf[pathbufcwd] ? unmeta(pathbuf + pathbufcwd) : "."; ! if (dirs) { struct stat st; stat(fn, &st); /* a directory with subdirectories has link count greater than 2 */ --- 351,357 ---- int subdirlen = 0; fn = pathbuf[pathbufcwd] ? unmeta(pathbuf + pathbufcwd) : "."; ! if (dirs && !q->follow) { struct stat st; stat(fn, &st); /* a directory with subdirectories has link count greater than 2 */ -- Geoff Wing Mobile : 0412 162 441 Work URL: http://www.primenet.com.au/ Ego URL: http://pobox.com/~gcw/