delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/05/23/11:59:57

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <4836E9E4.8882CB9B@dessent.net>
Date: Fri, 23 May 2008 08:59:32 -0700
From: Brian Dessent <brian AT dessent DOT net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: cd not following windows shortcuts
References: <f79359b60805230815k635c16cbub5cbda0d17c0b9a8 AT mail DOT gmail DOT com>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

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.

Brian

--
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