X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-0.1 required=5.0	tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <795864420.20100610141034@mtu-net.ru>
References: <OFF145E76E.EB43EC60-ON8525773C.005639A6-8525773C.005650D6@lnotes-gw.ent.nwie.net> 	<AANLkTil0pNuO4a9n2Ln5H3Q0cJRdQER7NlgSTg2a9EN2@mail.gmail.com> 	<OFCB72527D.F8E42EE2-ON8525773C.0058E3E2-8525773C.0059F451@lnotes-gw.ent.nwie.net> 	<1276042636.1651.9.camel@erebor> <AANLkTil6fa2-stL9f3hd-Dg-X6FjzVKLeG56lPoI7OYp@mail.gmail.com> 	<20100609044034.GB9305@ednor.casa.cgf.cx> <AANLkTikJ9U3U49HlT9Ldm6aueX3z22gN_6L95P-E2Pwz@mail.gmail.com> 	<795864420.20100610141034@mtu-net.ru>
From: Julio Costa <costaju@gmail.com>
Date: Fri, 11 Jun 2010 10:15:15 +0100
Message-ID: <AANLkTilhFshioAhrTOFM51-qunHDITeejK8w7Ikli2yI@mail.gmail.com>
Subject: Re: 'cp' utility bug when <dest-name>.exe file exist.
To: Andrey Repin <cygwin@cygwin.com>
Content-Type: text/plain; charset=UTF-8
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Thu, Jun 10, 2010 at 11:10, Andrey Repin wrote:
> Greetings, Julio Costa!
>

Hi, Andrey!

>>>>And this is where my head got reeeally spinning... can anyone, please,
>>>>explain the reason to why this .exe magic exists, anyway?
>>>
>>> It's already been explained in this very thread.
>>>
>
>> I'm must be getting pretty dense.
>> The only explanation I already had seen was from Eric Blake:
>> "(...) but Windows insists on having the .exe suffix for cmd to be
>> able to run an executable (...)"
>
>> That was already been explained, in other occasions, and also in the
>> thread indicated by myself.
>> The point is, that *is not* a reason, because it is easily fixed by
>> "set PATHEXE=%PATHEXE%:.".
>
>> Demo:
>> = - = - = - = - = - = -
>
> That's nice one, as has been pointed, but let's make a step back to the
> definitions and see what we have on hand, before advancing in this way?
> "Extension is a part of the file name, after last period".
> Two conclusions we can make from it:
> 1. Extension itself can't contain a period.
> 2. The file can't have an extension only and only if it has no periods in the
> name.
>
> Doing this kind of magic, you only ease the burden of file handling for cygwin
> in windows, but by a little margin, IMO.

Not quite. How many Cygwin executables with dots in the filename
(excluding the final .exe, of course) are there in the distribution?

Anyway, you _are_ right. You have the right to want to build something
like 'my.app', and then thing gets borked.
But as I said, this is just a DEMO of what's possible to do. If we
wanted to really step into this, and ensure a 100% solution, that
would involve a much more elaborated approach (i.e., involving a lot
of shell integration work).
I'm afraid the work to fill in that gap would not justify the small
gains, though.

> File name could have more dots than what you can imagine...
>

You.can.try.my.imagination!

> Also, this same trick could be applied to the Explorer as well.
>
> REGEDIT4
>
> [HKEY_CLASSES_ROOT\.\shell\Open\command]
> @="\"%1\" %*"
>
>

That's what the regtool example I gave is doing, basically.

>
> Sorry for my terrible english...
>

As I'm not a native speaker, I found your english truly enjoyable.
Maybe mine is as terrible as yours, but no one as told me yet! :)


___________
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

