delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2002/07/04/17:00:15

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
Date: Thu, 4 Jul 2002 17:00:22 -0400
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin-developers AT cygwin DOT com
Subject: Re: symlink_info & suffix_scan
Message-ID: <20020704210022.GB8157@redhat.com>
Reply-To: cygwin-developers AT cygwin DOT com
Mail-Followup-To: cygwin-developers AT cygwin DOT com
References: <04f701c22399$5f15fc40$6132bc3e AT BABEL>
Mime-Version: 1.0
In-Reply-To: <04f701c22399$5f15fc40$6132bc3e@BABEL>
User-Agent: Mutt/1.3.23.1i

On Thu, Jul 04, 2002 at 09:28:34PM +0100, Conrad Scott wrote:
>I don't fully understand what this code is doing but I've managed
>to convince myself that it's not doing the right thing :-)
>
>In path.cc, symlink_info::check() constructs a suffix_scan object
>and then calls the suffix_scan::next() method repeatedly.  If you
>stat(2) a non-existent file *without a suffix* (e.g. ls -L
>nonexistent), the suffix_scan object gives the following results:
>
>path = nonexistent,         lnk_match() = false
>path = nonexistent.exe,     lnk_match() = false
>path = nonexistent.exe,     lnk_match() = true
>path = nonexistent.exe.lnk, lnk_match() = true
>path = nonexistent.lnk,     lnk_match() = true
>
>The issue is that it gives the path "nonexistent.exe" twice, once
>with and once without lnk_match() being true.  AFAICT it should
>either give "nonexistent.exe" once (without lnk_match() being
>true) or it should *also* give "nonexistent" *with* lnk_match()
>true.

Hmm.  Looks wrong.  I'll take a look at it.  Thanks for the heads up.

cgf

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019