delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <4C0E4D4D.4010102@redhat.com> |
Date: | Tue, 08 Jun 2010 08:01:49 -0600 |
From: | Eric Blake <eblake AT redhat DOT com> |
User-Agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Lightning/1.0b2pre Mnenhy/0.8.2 Thunderbird/3.0.4 |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: 'cp' utility bug when <dest-name>.exe file exist. |
References: | <hulhlm$ro4$1 AT dough DOT gmane DOT org> |
In-Reply-To: | <hulhlm$ro4$1@dough.gmane.org> |
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 |
--------------enig7150E6D5950A0CFA3A2EF541 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/08/2010 07:47 AM, Oleksandr Gavenko wrote: > $ touch my.exe > $ touch some-file > $ cp some-file my > cp: cannot create regular file `my': File exists > $ cp -f some-file my > cp: cannot create regular file `my': File exists >=20 > Same happen ever in cmd.exe so this is not 'bash' fault. This is an issue with the fact that cygwin has to support .exe magic. The problem is that cygwin (rightly) refuses to create "my" if "my.exe" exists. But which is better? Cygwin doesn't know whether you meant to delete my.exe and replace it with "my", or if you meant to replace "my.exe" but keep the magic suffix. Since we don't know the right hueristics for patching rename(2) (and/or cp(1)) to guess what most people want most of the time, I think that the error message is the best we can do in this particular case of file name conflict. But I'm welcome to the idea of changing coreutils to try and do a more sensible action, if we can get list consensus on what a more sensible action would be. --=20 Eric Blake eblake AT redhat DOT com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enig7150E6D5950A0CFA3A2EF541 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJMDk1NAAoJEKeha0olJ0NqYDIH/RpZKH/u7cvEX6nrnK4Wg625 Z/Cfa2fmHcRZzzb7q7SipBL6j0fSZsfaFcpissS8KZMfCrk11cEq2lXLhRiY3Lsb 7psqC2SSemddqUlumyN76nc7Vzkzj2TevhLUZC3RZQ71YpMxvIrhYVUZTsFxv7bH umR+x7l+oLd5GC8Z1flVkcRANBSSuGDj3ErZ8LIu3xqrKvzLCWbFyKNKvpP1Ynst J2DDUfj6gqDKkYp4wu4DIknOl3ObMdK/qPiLJ61GtaURsrA+tKuXNM5NwzC3zckw pZhzEXWz4iZciuggZZZb6VZ3Z/VPq8x39sS1syVrBPC0w/I8bb1S992B3vfuh74= =bp21 -----END PGP SIGNATURE----- --------------enig7150E6D5950A0CFA3A2EF541--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |