X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0	tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <20100915140721.GS15121@calimero.vinschen.de>
References: <AANLkTimrrA-cW8t9u=axyxQt+AyHcckybVRjksFYM6Bg@mail.gmail.com>	<20100915120315.GQ15121@calimero.vinschen.de>	<AANLkTimjDFH39z=cHH+ZTYPAg2OOuC80yzQ4i0TT=pN=@mail.gmail.com>	<20100915135030.GR15121@calimero.vinschen.de>	<20100915140721.GS15121@calimero.vinschen.de>
Date: Wed, 15 Sep 2010 18:23:47 +0200
Message-ID: <AANLkTimo=wkaoCOmr3SPqEJ1yLpMZBg1Dwy=hNs34b9E@mail.gmail.com>
Subject: Re: .exe magic reloaded 2
From: Al <oss.elmar@googlemail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
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

>
> For instance, this one: =A0Either we always remove the .exe suffix from
> a file, or we have to check for each file with a .exe suffix, whether
> it's executable or not.

Probably without checking it. No sane program would use the .exe
suffix as extension of a mere textfile.

What would be the ideal approach, without thinking of backward issues?

How about this?

1.) When a file is made executable .exe is appended, but only visible
from Windows API.
2.) When the last execution bit is removed the .exe suffix is also removed.
3.) Using the .exe suffix from the Cygwin API always gives an error.
4.) Hence: You never see this suffix on the Cygwin API.

Al

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

