This is the mail archive of the
mailing list for the Cygwin project.
Re: cd not following windows shortcuts
Gustavo Seabra wrote:
> Right, it isn't a directory. But shouldn't Cygwin convert the path and
> follow it just the same? Is there something wrong with the behavior
> I'm seeing?
For one thing, the .lnk must have the R attribute set in order for
Cygwin to even consider it a symlink and not a regular file, and
normally Explorer does not set the R attribute. And of course a .lnk
created with Explorer will not have the POSIX path set in the
'description' field, meaning that it can only point to an absolute Win32
path unless you hand edit the field. Moreover the symlink reading code
in Cygwin does not contain a full parser for the shortcut file format
(which AFAIK is some kind of undocumented memory dump of a shell COM
object, which can take on many forms e.g. a shortcut to Control Panel),
only enough to read the specific format that Cygwin creates, so it
wouldn't surprise me if it was possible to create all kinds of shortcuts
in Explorer that Cygwin can't parse.
You might be lucky and simply setting +R might suffice, I have no idea.
But if it doesn't, realize that the intent of the feature was for
Cygwin-created symlinks to also work in Explorer as a bonus, not
necessarily the other way around.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html