Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: 3.1.2 beta bug
- X-seq: zsh-workers 3368
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxxxxxxx>
- To: jdz@xxxxxxxxxxxxxxxxxx (Jesse Zbikowski)
- Subject: Re: 3.1.2 beta bug
- Date: Mon, 21 Jul 1997 15:51:52 -0400 (EDT)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <199707211925.MAA25015@xxxxxxxxxxxxxxxxxx> 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);
Messages sorted by:
Reverse Date,
Date,
Thread,
Author