Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Sat, 9 Jul 2005 01:02:14 -0400
From: Christopher Faylor <cgf-no-personal-reply-please@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: Unwanted .exe appended to symlinks
Message-ID: <20050709050214.GA10083@trixie.casa.cgf.cx>
Reply-To: cygwin@cygwin.com
References: <1120880636.6400.7.camel@localhost.localdomain> <42CF4C9D.8000708@byu.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <42CF4C9D.8000708@byu.net>
User-Agent: Mutt/1.5.8i

On Fri, Jul 08, 2005 at 10:03:41PM -0600, Eric Blake wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>According to fergus on 7/8/2005 9:43 PM:
>> 	ln -s /cygdrive/c /c
>> 	ln -s /cygdrive/f /f
>> Following the recent upgrade to cygutils I find that the symlink is
>> created as /c.exe not /c and /f.exe not /f in cases where the drive
>> exists.
>
>Confirmed.  Unfortunately, this is a side effect of my improvements to ln
>to unify the cygwin-specific .exe code which tries to determine when the
>original file exists as just "file" vs. "file.exe".  Inside normal
>directories, the test is simple - check if "file." exists (since Windows
>flattens the trailing .).  But for virtual filenames (such as /cygdrive,
>/proc/registry, //server, or managed drives), the trailing . trick doesn't
>work.  I really NEED a way to tell whether a file exists with exact
>spelling, or had .exe appended, and you've found a place where the
>trailing . trick is not cutting it.  Since ln, mv, and cp share my
>cygwin-specific code now, I imagine it is probably easy to find a similar
>bug in cp or mv.

I don't get it.  Certainly /cygdrive/c.exe doesn't exist so why would you
try to link to it?

cgf

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

