public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Inconsistence on file operation when the name already exists with exe extension
@ 2012-07-09 15:23 notstop
  2012-07-09 15:45 ` Christopher Faylor
  0 siblings, 1 reply; 20+ messages in thread
From: notstop @ 2012-07-09 15:23 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 20+ messages in thread
* Inconsistence on file operation when the name already exists with exe extension
@ 2012-07-08 20:03 Aaron Schneider
  2012-07-08 20:19 ` Aaron Schneider
  0 siblings, 1 reply; 20+ messages in thread
From: Aaron Schneider @ 2012-07-08 20:03 UTC (permalink / raw)
  To: cygwin


On an empty dir:

touch file.exetouch file.imgtouch file doesn't create the corresponding file.
Then
touch helppcp helpp file
cp: can't create regular file «file»: File exists
On rm file it removes the file.exe instead of saying file not found.
Is this behavior intended? This is not unix like, the filename should be preserved as is. 		 	   		  

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2012-07-11  0:50 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-09 15:23 Inconsistence on file operation when the name already exists with exe extension notstop
2012-07-09 15:45 ` Christopher Faylor
2012-07-09 16:47   ` Steven Hartland
2012-07-09 17:20   ` Aaron Schneider
2012-07-10  5:38     ` Matt Seitz
2012-07-10  8:45       ` Aaron Schneider
2012-07-10 15:25         ` Earnie Boyd
2012-07-10 16:23           ` Larry Hall (Cygwin)
2012-07-10 16:54           ` Aaron Schneider
2012-07-10 17:03             ` Christopher Faylor
2012-07-10 18:59             ` Earnie Boyd
2012-07-11  0:50             ` Andrey Repin
  -- strict thread matches above, loose matches on Subject: below --
2012-07-08 20:03 Aaron Schneider
2012-07-08 20:19 ` Aaron Schneider
2012-07-08 20:27   ` marco atzeri
2012-07-08 20:37     ` Aaron Schneider
2012-07-09 12:36       ` Earnie Boyd
2012-07-08 20:49     ` Aaron Schneider
2012-07-08 22:43   ` Buchbinder, Barry (NIH/NIAID) [E]
2012-07-08 23:20   ` Andrey Repin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).