delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/01/13:23:17

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
Date: Wed, 1 Oct 2003 13:22:41 -0400
From: Christopher Faylor <cgf-rcm AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: ln and mkshortcut inconsistent in handling of .exe extension
Message-ID: <20031001172241.GC8392@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <5 DOT 1 DOT 0 DOT 14 DOT 0 DOT 20030929161708 DOT 028d6fe0 AT 127 DOT 0 DOT 0 DOT 1> <5 DOT 1 DOT 0 DOT 14 DOT 0 DOT 20030929161708 DOT 028d6fe0 AT 127 DOT 0 DOT 0 DOT 1> <5 DOT 1 DOT 0 DOT 14 DOT 0 DOT 20030930123307 DOT 0283c890 AT 127 DOT 0 DOT 0 DOT 1> <m2n0cmq8or DOT fsf AT beth DOT swift DOT xxx>
Mime-Version: 1.0
In-Reply-To: <m2n0cmq8or.fsf@beth.swift.xxx>
User-Agent: Mutt/1.4.1i

On Tue, Sep 30, 2003 at 05:15:48PM -0400, Matt Swift wrote:
>That's only part of the stated goals of 'ln'.  When CYGWIN contains
>"winsymlinks" (or more accurately, does not contain "nowinsymlinks"
>since "winsymlinks" is the stated default), symbolic links are supposed
>to function both as Cygwin symbolic link and as Windows Shortcuts.
>This is true most of the time, but it is NOT true when the symlink
>target's name given to ln is the name of an executable without its .exe
>extension.  In this case, the file created by ln functions as a Cygwin
>symbolic link as expected but contrary to expectation does *not*
>function as a Windows Shortcut.  The file created by 'ln', considered
>as a Windows Shortcut, is broken.  My points are

  cd /bin
  ln -s pwd foo
  ./foo		# works
  cat ./foo	# fails

Why does running foo work?  Because Windows CreateProcess call does not
need a .exe extension to run a program.  Why does cat fail?  Because
'foo' resolves to 'pwd' and, as far as the Windows CreateFile is
concerned, there is no file called 'pwd'.

So, what you are seeing is a side effect of the way windows operates.  We're
not going to change ln to automatically add a .exe extension.

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