This is the mail archive of the
mailing list for the Cygwin project.
RE: Problem with dereference option on Windows LNKs (shortcuts)
- From: "Mellem, Dan" <Dan dot Mellem at pomona dot k12 dot ca dot us>
- To: 'Max Bowsher' <maxb at ukf dot net>, cygwin at cygwin dot com
- Date: Mon, 14 Jul 2003 14:22:47 -0700
- Subject: RE: Problem with dereference option on Windows LNKs (shortcuts)
> -----Original Message-----
> From: Max Bowsher On: 7/14/03 2:08 PM
> Mellem, Dan wrote:
> > From: Igor Pechtchanski On: 7/12/03 6:05 PM
> >> Cygwin symlinks are a bit more than read-only shortcut
> (.lnk) files.
> >> They have a special format, and they also have something in their
> >> "Comment" field (that you can check via shortcut
> properties). In short,
> >> you cannot easily create a Cygwin symlink from outside Cygwin. For
> >> exact details, see the source of the symlink() function in
> >> winsup/cygwin/path.cc.
> >> Igor
> > Thanks, Igor. I thought that since it created
> MS-Windows-compatable .LNKs,
> > it also read regular .LNKs and used them as symlinks.
> > I took a look at the source
> > (http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/winsup/cygwi
> > oot=src) but didn't find anything specific that said that they aren't
> > treated as symlinks. I'm not familiar with the source but there was a
> > section:
> > I don't know what this all means but it implies to me that it will at
> > attempt to read the shortcut file. Is it possible to parse through
> > shortcut files too?
> Possible to write code to do this? Yes, of course, but probably not
> desirable, see below.
> Possible to set an option to cause this? No, not currently, and probably
> Importantly, a Cygwin symlink contains a *POSIX* path. The fact that the
> symlink is also a windows shortcut is essentially just decoration.
> Obviously, a normal shortcut does not contain a POSIX path. It would
> probably be possible to deduce one, but there are good reasons for not
> so: Extra data (icon, etc.) would be removed when shortcuts were saved and
> restored with tar, for example.
Oh, I see. A utility to convert Shortcuts to symlinks would be very useful
for this. I'm going to try to hack something up in PERL with the
Win32::Shortcut module I found but I still need to find the file layout for
Thanks for all the help.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html