Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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/