This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: symlink_info & suffix_scan


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]