This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Ok, I would like to jump in this subject, because this is getting me
too waay curious...

On Wed, Jun 9, 2010 at 01:17, Matthew B. Smith wrote:
> Ill throw in my two cents. ÂI don't want to overwrite an existing file
> accidentally. ÂIe if I ls > foo and that writes to foo.exe I would be
> frustrated. ÂThis hasn't happened to me yet so it might not be to big of
> a problem. ÂIt seems a bit odd that the behavior would change if there
> is a file in the directory of a different name.
>

"odd" seems like a true description of this ".exe magic" behaviour.
And that is because Cygwin is trying to be more smart than the user itself :)

>> >
>> >If you took away Cygwin's .exe extension handling and just relied on
>> >file permissions like Unix, then using Cygwin tools from a cmd.exe
>> >prompt would become problematic.
>> >

Not exactly. Try this in a cmd.exe:

PATHEXT=%PATHEXT%;.

Now try running something extensionless... tadaa! CMD magic! :)

And this is where my head got reeeally spinning... can anyone, please,
explain the reason to why this .exe magic exists, anyway?

And to all of you following this subject - there are some interesting
answers in this OLD thread:
http://www.cygwin.com/ml/cygwin/2007-04/msg00515.html

Alas, it is not clear (at least to me) what kind of use cases are we
trying to protect with the .exe magic.
The cmd.exe launching of executables is solved with the PATHEXT. Is
there any more use cases?

I'm just reviving this question because I think this could be one of
those historic features, which at one point in time turns obsolete but
"it has always been there"... (* wishful thinking alarm*)

>>
>> I am just against operating systems making decisions for the user, or
>> restricting him/her unnecessarily. ÂAnd, yes, I know that this happens
>> all the time...
>>

ditto.

And additionally, this is one of those kind of features which is
probably a real PITA to maintain (in several packages besides the
cygwin itself), fattening the patching over upstream versions... and
of course one more big stone to add to the slowness of cygwin.

I see several downsides of this feature... and I fail to see the upsides.
Please, cgf and corinna, can you shed some light on this?

Best regards,
___________
Julio Costa

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]