delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/06/08/20:17:38

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=BAYES_00,DKIM_ADSP_NXDOMAIN,NO_DNS_FOR_FROM,RCVD_IN_DNSWL_NONE
X-Spam-Check-By: sourceware.org
Subject: Re: 'cp' utility bug when <dest-name>.exe file exist.
From: "Matthew B. Smith" <melkor AT orangpalantir DOT org>
To: cygwin AT cygwin DOT com
In-Reply-To: <OFCB72527D.F8E42EE2-ON8525773C.0058E3E2-8525773C.0059F451@lnotes-gw.ent.nwie.net>
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>
Date: Tue, 08 Jun 2010 20:17:16 -0400
Message-ID: <1276042636.1651.9.camel@erebor>
Mime-Version: 1.0
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

Ill throw in my two cents.  I don't want to overwrite an existing file
accidentally.  Ie if I ls > foo and that writes to foo.exe I would be
frustrated.  This hasn't happened to me yet so it might not be to big of
a problem.  It seems a bit odd that the behavior would change if there
is a file in the directory of a different name.  

Preferable I would like cp foo bar, to create a file "bar" without an
extension as opposed to overwriting "bar.exe".  Anyway its good to have
heard about this.

mbs

On Tue, 2010-06-08 at 12:22 -0400, RISINGP1 AT nationwide DOT com wrote:
> >> I disagree.  This seems to me to be adopting the Microsoft policy of 
> doing
> >> the user's thinking for them:  "I don't care what they want - we know
> >> what's best for them."  If a person wants to have "foo" and "foo.exe" 
> in
> >> the same directory, that should be allowed.  A few times getting 
> tripped
> >> up by the wrong thing executing will be a good life lesson for the 
> person,
> >> and teach about how different operating systems work to boot.  Should I
> >> create "foo" as an executable, and "foo.exe" exists, then if I want to 
> run
> >> "foo.exe", I should have to call it out specifically.  I can see this
> >> might cause some confusion should, unbeknownst to the user, "foo.exe"
> >> exists earlier in the path than "foo", but that would become an
> >> education on how to use the PATH variable.  This confusion arises
> >> from Cygwin's kowtowing to Microsoft's dubious idea of using extensions 
> to
> >> control the handling of files.
> >
> >If you took away Cygwin's .exe extension handling and just relied on
> >file permissions like Unix, then using Cygwin tools from a cmd.exe
> >prompt would become problematic.
> >
> >Windows wants that .exe (or .bat or .cmd or .msi, etc) extension and
> >doesn't give a whip if you chmod a file's permissions +x.  Without an
> >extension, Windows has no idea what to do with the file.
> >
> >That's fine if you never do anything with Cygwin commands outside of a
> >Cygwin shell, but I don't think this is a globally desirable
> >behaviour.
> >
> 
> Just a question:
> 
> Shouldn't it be up to the user to determine how a file is to be used, and
> name the file accordingly?
> 
> If the file is to used only in a Cygwin environment, leave the extension
> off is desired.
> 
> If the file is to used in both a Cygwin and a Windows environment, add an
> extension (like ".sh" or ".exe" or whatever is needed).  It is easy enough
> to teach Windows how to recognize what to do with a new extension (like
> ".sh").
> 
> I am just against operating systems making decisions for the user, or
> restricting him/her unnecessarily.  And, yes, I know that this happens
> all the time...
> 
> Phil Rising    risingp1 AT nationwide DOT com
> 
> --
> 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
> 



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