delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/01/15/04:32:51

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Sat, 15 Jan 2005 10:32:34 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: odd behavior of symlinks on Win XP SP2
Message-ID: <20050115093234.GE3113@cygbert.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <200501142350 DOT j0ENo8728199 AT networking DOT Stanford DOT EDU> <Pine DOT GSO DOT 4 DOT 61 DOT 0501141951550 DOT 18782 AT slinky DOT cs DOT nyu DOT edu>
Mime-Version: 1.0
In-Reply-To: <Pine.GSO.4.61.0501141951550.18782@slinky.cs.nyu.edu>
User-Agent: Mutt/1.4.2i

On Jan 14 20:05, Igor Pechtchanski wrote:
> On Fri, 14 Jan 2005, Jeff.Hodges wrote:
> > Mostly these are symlinks to directories which I use to more
> > conveniently traipse around my filesystem. This was true of all my
> > cygwin install/upgrades on Win2k from say 1999 thru 2004. The native Win
> > filesystem has been NTFS in all cases, fwiw.

2001.  The shortcuts have been added to Cygwin in 2001.

> > 1. cygwin-created (via "ln -s") symlinks/shortcuts pointing to a
> > directory are displayed in windows file dialogs with the windows default
> > "funky file" icon (I dunno what it's actual name is) rather than the
> > windows folder icon as used to be the case on win2k/cygwin.
> > 
> > 2. cygwin-created (via "ln -s") symlinks/shortcuts pointing to a
> > directory are displayed in some windows file-open or file-save dialogs,
> > but not in others. On win2k/cygwin, they were always displayed and
> > always behaved exactly like windows-created shortcuts pointing to a
> > directory. In terms of how they are behaving on WinXP/cygwin..
> >
> > 2.1. In the cases where they *are* displayed in windows file-open or
> > file-save dialogs, e.g. using windows version of OpenOffice 1.1.3, the
> > program in question attempts to either open the symlink/shortcut file
> > itself or overwrite it, respectively.
> >
> > 2.2. In the cases where they "are not* displayed in the windows dialog
> > (whether open or save), e.g. as done by Firefox 1.0 in the file-save
> > case, well, the symlink/shortcut simply isn't listed in the dialog, when
> > on win2k/cygwin they were displayed (and behaved) just fine.
> 
> Hmm, interesting.  I've never noticed this, but your mail prompted me to
> look on my own machine.  And, lo and behold, on a plain WinXP SP1 (note,
> no SP2) I get the same behavior.

But they work in Windows Explorer, nevertheless.  We're not in control
of the icon used by Windows.  As soon as we do, the shortcut is not a
Cygwin shortcut anymore and it's saved by tar as a file rather than a
symlink.

> I've noticed this.  Further, after a quick look at the structure of the
> symlinks[*] shows that the shortcuts created by WinXP have much more stuff
> in them (513 bytes vs. 115 bytes), and they seem to have most of the stuff
> (comments and paths) in Unicode.  I suspect that WinXP doesn't really deal
> well with non-Unicode shortcuts.
> 
> Perhaps an update to Cygwin's symlink() implementation is in order?  The
> one that's there now actually has the structure of a Windows symlink
> hard-coded in (which apparently fails on XP).  See path.cc in
> src/winsup/cygwin.  <http://cygwin.com/acronyms/#PTC>.

It has been done so for speed.  And it doesn't really fail.  The shortcut
is still a shortcut in Windows Explorer.  I'm wondering if it's really 
the Unicodeness of the shortcut which makes the difference.  Usually
shortcuts generated in Windows Explorer are much longer anyway.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

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