[patch] cygcheck.cc update for cygpath()

Corinna Vinschen corinna-cygwin@cygwin.com
Sun Mar 9 10:36:00 GMT 2008


On Mar  9 03:32, Brian Dessent wrote:
> Corinna Vinschen wrote:
> 
> > > > I'm wondering if you would like to tweak the readlink functions, too.
> > > > Cygwin shortcuts can now have the path name appended to the actual
> > > > shortcut data.  This hack was necessary to support pathnames longer than
> > > > 2000 chars.  See the comment and code in cygwin/path.cc, line 3139ff.
> > >
> > > Oh, I didn't know that.  I'll add that to the list.
> > 
> > Thanks again.  I'm finally seeing light at the end of the long path
> > name tunnel :)
> 
> Actually I'm a little confused now.  It seems like the code in
> utils/path.cc:readlink() reads the Win32 path out of shortcut symlinks
> but the POSIX path out of old-style symlinks -- not that it has any
> choice since they don't contain the win32 path.  If that is the case
> (and assuming I'm reading the new long filename symlink code correctly)
> then it doesn't need any chaging since the [path too long] workaround
> only applies to the POSIX link target stored in the 'description' field,
> right?

Now that you mention it... did you see the comment in path.cc, line 3112ff?
There's a good chance that Windows shortcuts are not capable of long path
names.  I didn't test it so far, but it would be certainly better for
readlink to use the POSIX path in the symlink either way.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat



More information about the Cygwin-patches mailing list