delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/06/08/11:48:51

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: <4C0E662C.7040901@redhat.com>
Date: Tue, 08 Jun 2010 09:47:56 -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: <OFF145E76E DOT EB43EC60-ON8525773C DOT 005639A6-8525773C DOT 005650D6 AT lnotes-gw DOT ent DOT nwie DOT net>
In-Reply-To: <OFF145E76E.EB43EC60-ON8525773C.005639A6-8525773C.005650D6@lnotes-gw.ent.nwie.net>
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

--------------enig8EB8C41E2E9295D425A8003C
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 06/08/2010 09:42 AM, RISINGP1 AT nationwide DOT com wrote:
> As to the "cp" issue, while IMHO, it should go ahead and do the copy,
> a more instructive error message would be helpful:
>=20
> cp: cannot create regular file `my': File 'my.exe' exists

Huh?  Do the copy, then give a failure message?  No.  A failure message
should only occur if the copy failed.

Did you mean "continue to fail, but make the failure message more
friendly?"  If so:
Patches to coreutils welcome.  But be aware that this error message uses
the equivalent of perror(), where EEXIST would not have quite that
wording.  In other words, such a patch would be pretty invasive, to
recognize the exact errno value that cygwin1.dll returns in this
particular failure-to-create case, then massaging just that error case
into your desired message, so I probably won't be writing the patch any
time soon (I've got higher-priority things on my plate at the moment).

Or did you mean "change it to succeed, in spite of the naming conflict",
in which case there is no failure message and nothing to patch in coreutils.

--=20
Eric Blake   eblake AT redhat DOT com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


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

iQEcBAEBCAAGBQJMDmYsAAoJEKeha0olJ0Nq0LQH/Az8LfvkfiXlBu9p4hic2Mtt
ykONcB2N3pNzYToHNIaa86kudE8BXXbrqjgxmWstqppTwiSHhXGY4szduwauFk5Z
Ig09h2RIPGpVPA3U5MpUJEdZoWn27LjwkYW/LSrocSicQ3DGzjtGkPVsGRI0TQD9
Rjrg03aulOyR2IETD/fg5OZx9q9Um2x4/AT3qMvHmOylDW5F95vSSDcKjc0t2+wq
kmjlUC/2AWzxGiZXDIvsI57qV+y0OJWrsX7nAwQldCaE5015ywG6a6O1YBAj1ys/
DVSnzOxoTEB/xiOig4VarUR1lNvTH9wBhTYtao3EwcRQO/7tdtGXiQ0rsFv4xaM=
=NVQI
-----END PGP SIGNATURE-----

--------------enig8EB8C41E2E9295D425A8003C--

- Raw text -


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