Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: 3.1.5: ``***'' symlink follow broken
- X-seq: zsh-workers 4607
- From: Geoff Wing <gcw@xxxxxxxxx>
- To: Zsh Hackers <zsh-workers@xxxxxxxxxxxxxxx>
- Subject: PATCH: 3.1.5: ``***'' symlink follow broken
- Date: Thu, 12 Nov 1998 17:20:55 +1100
- Organization: PrimeNet Computer Consultancy
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 <gcw@xxxxxxxxx> Mobile : 0412 162 441
Work URL: http://www.primenet.com.au/ Ego URL: http://pobox.com/~gcw/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author