On Wed, 30 Mar 2005, Christopher Faylor wrote: > On Wed, Mar 30, 2005 at 01:51:36PM -0500, Igor Pechtchanski wrote: > >ChangeLog: > >2005-03-21 Igor Pechtchanski <[EMAIL PROTECTED]> > > > > * path.cc (symlink_info::case_check): Ignore trailing characters > > in paths when comparing case. > > Doesn't this ignore all trailing characters so that "foo" could match > "foobbbbb"?
It could, but it won't. The two strings being compared are the original filename,and the filename returned by Windows when trying to find the original filename. If they differ this drastically, the comparison will never happen. Igor > >Index: winsup/cygwin/path.cc > >=================================================================== > >RCS file: /cvs/src/src/winsup/cygwin/path.cc,v > >retrieving revision 1.355 > >diff -u -p -r1.355 path.cc > >--- winsup/cygwin/path.cc 12 Mar 2005 02:32:59 -0000 1.355 > >+++ winsup/cygwin/path.cc 22 Mar 2005 00:46:23 -0000 > >@@ -3230,7 +3231,8 @@ symlink_info::case_check (char *path) > > FindClose (h); > > > > /* If that part of the component exists, check the case. */ > >- if (strcmp (c, data.cFileName)) > >+ len = strlen(data.cFileName); > >+ if (strncmp (c, data.cFileName, len)) > > { > > case_clash = true; -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ [EMAIL PROTECTED] ZZZzz /,`.-'`' -. ;-;;,_ [EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "The Sun will pass between the Earth and the Moon tonight for a total Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT