From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26067 invoked from network); 21 Jul 1997 20:57:02 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 21 Jul 1997 20:57:02 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id QAA23435; Mon, 21 Jul 1997 16:51:46 -0400 (EDT) Resent-Date: Mon, 21 Jul 1997 16:51:46 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199707211951.PAA25628@node5.frontiernet.net> Subject: Re: 3.1.2 beta bug To: jdz@grogg.engr.sgi.com (Jesse Zbikowski) Date: Mon, 21 Jul 1997 15:51:52 -0400 (EDT) Cc: zsh-workers@math.gatech.edu In-Reply-To: <199707211925.MAA25015@grogg.engr.sgi.com> from "Jesse Zbikowski" at Jul 21, 97 12:25:45 pm X-Mailer: ELM [version 2.4 PL25] Content-Type: text Resent-Message-ID: <"HM1nI.0.3k5.Ylyqp"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3368 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > I am experiencing the following anomaly from zsh 3.1.2 running under > IRIX: filename glob patterns which encompass multiple directories fail to > generate any filenames on the IRIX hwfgs filesystem. This is the > filesystem which maps hardware devices to files and directories; there > is no such problem on the "normal" xfs filesystem. As an experiment, 3.1.2 has leaf optimization. It is assumed that a directory has no subdirectories if a directory has a link count less than 2. This optimization is also used by GNU find as I know. Too bad that it does not work, since it can speed up some searches a lot (especially **/file type pattern globs). Maybe a test for nlink == 2 instead of <= 2 would help. A filesystem without the usual Unix directory link count semantics would probably have link count 1 for directories. Try this patch. Zoltan --- glob.c 1997/06/02 04:19:48 3.1.2.2 +++ glob.c 1997/07/21 19:46:42 @@ -364,7 +364,7 @@ struct stat st; stat(fn, &st); /* a directory with subdirectories has link count greater than 2 */ - if (!S_ISDIR(st.st_mode) || st.st_nlink <= 2) + if (!S_ISDIR(st.st_mode) || st.st_nlink == 2) return; } lock = opendir(fn);