'cp' utility bug when <dest-name>.exe file exist.

Eric Blake eblake@redhat.com
Wed Jun 9 13:21:00 GMT 2010


On 06/09/2010 07:14 AM, Alexander T wrote:

[please don't top-post]

> Why not just do the exe magic for executing the files only? When
> opening, stating, copying, moving etc, you could leave it out. This
> seems the most reasonable compromise to me, but there could of course
> be cases which I am overseeing, but I wouldn't expect any script to
> rely on exe magic when opening a file for editing.

Have you ever encountered a makefile that doesn't consistently use
$(EXEEXT) everywhere?  Too many people just expect 'gcc -o foo ...' to
produce foo, then 'strip foo' to work, without realizing that on cygwin,
gcc created 'foo.exe' and strip _has_ to have .exe magic.  Yet that is
exactly the case of executable images being opened for editing.  So the
question then is whether the magic should be centralized in cygwin1.dll
(preferable) or repeatedly patched into every program that needs it (a
maintenance nightmare).

Perhaps it does make sense to drop .exe suffixes; teaching gcc that -o
foo means we really want a suffix-less file, and teaching users that
they want to modify PATHEXE to include . if they are working from the
windows side of things.  But it won't be an overnight switch, and will
come with its share of complaints on the list.

Meanwhile, we can't get away from .lnk magic, but that produces orders
of magnitude less complaints on the list, so I'm not as worried about it.

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20100609/11ce1e54/attachment.sig>


More information about the Cygwin mailing list