From: Zoltan Hidvegi <hzoli@frontiernet.net>
To: jdz@grogg.engr.sgi.com (Jesse Zbikowski)
Cc: zsh-workers@math.gatech.edu
Subject: Re: 3.1.2 beta bug
Date: Mon, 21 Jul 1997 15:51:52 -0400 (EDT) [thread overview]
Message-ID: <199707211951.PAA25628@node5.frontiernet.net> (raw)
In-Reply-To: <199707211925.MAA25015@grogg.engr.sgi.com> from "Jesse Zbikowski" at Jul 21, 97 12:25:45 pm
> 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);
next prev parent reply other threads:[~1997-07-21 20:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-07-21 19:25 Jesse Zbikowski
1997-07-21 19:51 ` Zoltan Hidvegi [this message]
1997-07-22 8:35 ` Andrew Main
1997-07-22 11:12 ` Geoff Wing
1997-07-22 17:24 ` Zoltan T. Hidvegi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199707211951.PAA25628@node5.frontiernet.net \
--to=hzoli@frontiernet.net \
--cc=jdz@grogg.engr.sgi.com \
--cc=zsh-workers@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).