delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/06/08/23:16:09

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <AANLkTil6fa2-stL9f3hd-Dg-X6FjzVKLeG56lPoI7OYp@mail.gmail.com>
References: <OFF145E76E DOT EB43EC60-ON8525773C DOT 005639A6-8525773C DOT 005650D6 AT lnotes-gw DOT ent DOT nwie DOT net> <AANLkTil0pNuO4a9n2Ln5H3Q0cJRdQER7NlgSTg2a9EN2 AT mail DOT gmail DOT com> <OFCB72527D DOT F8E42EE2-ON8525773C DOT 0058E3E2-8525773C DOT 0059F451 AT lnotes-gw DOT ent DOT nwie DOT net> <1276042636 DOT 1651 DOT 9 DOT camel AT erebor> <AANLkTil6fa2-stL9f3hd-Dg-X6FjzVKLeG56lPoI7OYp AT mail DOT gmail DOT com>
Date: Wed, 9 Jun 2010 15:15:54 +1200
Message-ID: <AANLkTikNdkdkRb8dKLa_aLhqQfnQ3enHhRqsLfn3cvIJ@mail.gmail.com>
Subject: Re: 'cp' utility bug when <dest-name>.exe file exist.
From: David Antliff <david DOT antliff AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Wed, Jun 9, 2010 at 13:38, Julio Costa wrote:
> And this is where my head got reeeally spinning... can anyone, please,
> explain the reason to why this .exe magic exists, anyway?

I can't answer that, but there is a style of symlinks that use .lnk
files. Cygwin displays them without that extension, but the actual
filename is .lnk so presumably Cygwin has to do some 'lnk-magic' to
deal with that. I know it's not the same thing as exe-magic, but it
might be related because Cygwin has to hide the "reality" from the
user in order for the symlink to work.

On Wed, Jun 9, 2010 at 04:21, Corinna Vinschen wrote:
> There is.  "foo" can mean "foo". or "foo.lnk", or "foo.exe".  Cygwin is
> handling all these names as being the same file.

With symlinks I can understand this, but why match to .exe? Is it
because Cygwin allows a user to execute a .exe file without specifying
the .exe extension? That is perhaps wrong too - if I want to run
foo.exe, I should type ./foo.exe, not ./foo - but ./foo currently
works.

Then, perhaps this logic was translated into 'cp' (but not 'mv' for
some reason?) because people wanted to copy such executables around in
the same manner: "cp foo bar" rather than "cp foo.exe bar.exe" - but
this seems like merely a 'convenience' for Windows users and not a
very good one at that.

Oh well, yet another thing I suppose to add to my list of ways Windows
has set information technology back decades :-P

-- David.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019