delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/07/14/17:08:54

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <051501c34a4b$fc6b5100$6366883e@starfruit>
From: "Max Bowsher" <maxb AT ukf DOT net>
To: "Mellem, Dan" <Dan DOT Mellem AT pomona DOT k12 DOT ca DOT us>, <cygwin AT cygwin DOT com>
References: <4B8A0478615FD3118F1600508B0BB71B02F61ACA AT pusd-mail DOT pusd DOT org>
Subject: Re: Problem with dereference option on Windows LNKs (shortcuts)
Date: Mon, 14 Jul 2003 22:07:49 +0100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165

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/cygwin/path.cc?cvsr
> 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:
[snip code]
> I don't know what this all means but it implies to me that it will at
least
> attempt to read the shortcut file. Is it possible to parse through regular
> 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
never.

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 doing
so: Extra data (icon, etc.) would be removed when shortcuts were saved and
restored with tar, for example.

Max.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019