Re: Fun with cp -R error when both foo and foo.exe exist

2018-10-09 Thread Dan Kegel
Right. My thinking was that the auto-suffix probing makes sense when running or checking for a program, but not when creating a program. (I could be wrong, and I imagine if I actually compiled and tested the hack I'd find out pretty quickly if it was at least obviously wrong.) O_BINARY doesn't n

Re: Fun with cp -R error when both foo and foo.exe exist

2018-10-09 Thread Eric Blake
On 10/9/18 11:21 AM, Dan Kegel wrote: On Tue, Oct 9, 2018 at 5:03 AM Eric Blake wrote: whether someone patches the cygwin dll or cp, it seems like some rather hairy code for what is normally a rare corner case, so it probably won't happen unless someone actually contributes a patch. Right. H

Re: Fun with cp -R error when both foo and foo.exe exist

2018-10-09 Thread Dan Kegel
On Tue, Oct 9, 2018 at 5:03 AM Eric Blake wrote: > whether someone patches the cygwin dll or cp, it seems like some rather > hairy code for what is normally a rare corner case, so it probably won't > happen unless someone actually contributes a patch. Right. Here's a completely untested guess pa

Re: Fun with cp -R error when both foo and foo.exe exist

2018-10-09 Thread Eric Blake
On 10/9/18 1:22 AM, Marco Atzeri wrote: Am 08.10.2018 um 23:24 schrieb Dan Kegel: A nice workaround might be for the cygwin version of cp could arrange to wait to create .exe files until after any potential non-suffixed file has been processed... not sure how easy that would be. Apologies if

Re: Fun with cp -R error when both foo and foo.exe exist

2018-10-08 Thread Marco Atzeri
Am 08.10.2018 um 23:24 schrieb Dan Kegel: A nice workaround might be for the cygwin version of cp could arrange to wait to create .exe files until after any potential non-suffixed file has been processed... not sure how easy that would be. Apologies if this has already been discussed. - Dan

Fun with cp -R error when both foo and foo.exe exist

2018-10-08 Thread Dan Kegel
Everybody who uses cygwin knows that if foo and foo.exe exist, you can do cp foo bar cp foo.exe bar.exe but not cp foo.exe bar.exe cp foo bar because of the unavoidable magic in cygwin that lets you execute foo when you really mean foo.exe. Well, it just bit me again during a buildbot try