From: Geoff Wing <gcw@pobox.com>
To: Zsh Hackers <zsh-workers@math.gatech.edu>
Subject: PATCH: 3.1.5: ``***'' symlink follow broken
Date: Thu, 12 Nov 1998 17:20:55 +1100 [thread overview]
Message-ID: <19981112172055.A21356@primenet.com.au> (raw)
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@pobox.com> Mobile : 0412 162 441
Work URL: http://www.primenet.com.au/ Ego URL: http://pobox.com/~gcw/
next reply other threads:[~1998-11-12 6:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-11-12 6:20 Geoff Wing [this message]
1998-11-12 10:04 ` Bart Schaefer
1998-11-12 14:10 ` Peter Stephenson
1998-11-12 14:58 ` Bruce Stephens
1998-11-12 17:21 ` Bart Schaefer
1998-11-13 8:55 ` Peter Stephenson
1998-11-13 6:59 ` Geoff Wing
1998-11-13 17:15 ` PATCH: */* broken (Re: PATCH: 3.1.5: ``***'' symlink follow broken) Bart Schaefer
1998-11-14 12:38 ` Geoff Wing
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=19981112172055.A21356@primenet.com.au \
--to=gcw@pobox.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).