This is the mail archive of the cygwin@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]

Symlink Question (was: Re: Mysterious gdb behavior)


Paul Derbyshire wrote:
> I've gotten (at last) a genuinely useful looking, detailed reply. Too
> bad it was in a post that also contained an insult. This makes me
> unsure of the poster's motives, and therefore unsure whether the
> instructions given would sabotage anything.

Then why not read them through, and work out what they do?

> I've got a question about Cygwin symlinks, actually.

Best to post a new email with a different subject. Otherwise you risk your
question being missed.

> I looked at one
> via Winblows Exploder and saw it to be just a typical looking
> Winblows shortcut, except that a "comment" field (or some such) was
> set to the unixy path of the target. I tried creating a symlink
> outside of Cygwin by making a shortcut, giving it an appaopriate path
> and this other field, and making other attributes and settings
> identical, but Cygwin didn't see it as a symlink. It looks like
> there's another bit of "magic" involved, and I am curious as to what
> this is.

Use the source, Luke :-)

However, since this question intrigued me, I did that myself:

Cygwin creates its shortcuts by writing to the .lnk file itself (not through the
official Windows COM interfaces). Specifically, it requires that the shortcut
header be a specific sequence of bytes. A newly created windows shortcut does
not match this, presumably due to the introduction of fields that were always
null at the time when this bit of Cygwin was written.

Also, Cygwin .lnk symlinks should have the read-only attribute set to be
recognized as such.

The situation becomes even more complicated on NTFS, when the symlink info is
stored in an EA, as well.

Max.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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