zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: 3.1.5: ``***'' symlink follow broken
@ 1998-11-12  6:20 Geoff Wing
  1998-11-12 10:04 ` Bart Schaefer
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Geoff Wing @ 1998-11-12  6:20 UTC (permalink / raw)
  To: Zsh Hackers

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/


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~1998-11-14 12:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-11-12  6:20 PATCH: 3.1.5: ``***'' symlink follow broken Geoff Wing
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

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).