delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/07/09/11:23:42

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=1.7 required=5.0 tests=AWL,BAYES_05,FREEMAIL_FROM,MSGID_FROM_MTA_HEADER,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
Message-ID: <BLU0-SMTP193F74A0A7FC396B8160663CED30@phx.gbl>
Date: Mon, 9 Jul 2012 17:23:13 +0200
From: notstop <notstop AT live DOT com>
Reply-To: notstop AT users DOT sourceforge DOT net
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Inconsistence on file operation when the name already exists with exe extension
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

You must be right in some points, but that is not the exact behavior of 
windows command although you pretend it to be (the powershell has a 
different behavior). In fact, I can independently operate file while 
file.exe exists:

copy file.exe file
Now there are file and file.exe

-- windows cmd.exe behaves like that:

del file: removes file only regardless of file.exe existence
del file.exe: removes file.exe only regardless of file existence

-- Cygwin behaves differently:

rm file.exe: will remove only file.exe if exists
rm file: will remove file if exists, and if not will remove file.exe


Considering this, may be be an issue when untaring a tarfile whose 
contents will match an already existing file in the directory with the 
exe extension. If both thefile and thefile.exe are packed in the tar, 
won't be an issue since thefile is alphabetically precedent to 
thefile.exe so both will be untared, but is just a mere coincidence that 
it works. Would be an issue if where the opposite.


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