X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:content-type:mime-version:subject:from
	:in-reply-to:date:content-transfer-encoding:message-id
	:references:to; q=dns; s=default; b=GWsvT9a8sQgxpnRf1Q0IRUQxqswI
	Bgxew//cD4hp6UY2lgbk8MyeYwFSztMTaGkeNkOk7FFUPUD8rHeA0iQ1Nqvv6gDx
	Su9JugqxIXfFY/CG3pi3Vx9T0cmlDvS7rg+D6H3TO7jnI8BpAi+quZjdYr6R/oLj
	17Dk0vXhHI95YhM=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:content-type:mime-version:subject:from
	:in-reply-to:date:content-transfer-encoding:message-id
	:references:to; s=default; bh=M6OqwotVfHRN/yLebR77fzf0kwE=; b=VG
	dqqglK0s3XmJFOvx+hCBwyiLvHM4z6c0FU+ApAi/KfxO1PyPRq+eV06tf+rKxiNf
	MGJacSh2bEHSNjI8hUrmeHEqV/QZh7oBetYfI7Qadejf0h+UvYpBKDDidR7PljLR
	pCFPgjipqkozynTAnZxeufkSV3V2C45ARizr/b79A=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=HMime-Version:2104, H*UA:2.2104, HMime-Version:8.2, H*x:2.2104
X-HELO: mail-qt0-f182.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=1e100.net; s=20130820;        h=x-gm-message-state:mime-version:subject:from:in-reply-to:date         :content-transfer-encoding:message-id:references:to;        bh=iGop9zSodoER4zLIFD1D4w75j9+sJ2bIQeAmtormmX8=;        b=AxcapvHNwarKvvsDHV0qGhuPe31AQ/aRd32MUPnJfE03OnaMv/XzFgjLkr7vewZZ6E         0ziXIHNSp5xpLkysPT6Ugc3J7kEhw240SoDSOe1M+iHiNe7BYfKoGk6n24ncfF2TDtXq         fwKzDfYJGMtu93VEPFsH2uFq2P2f2u8adVjF3zvX89z31H74VWzqyOFsP9SQipAEptfw         LEvzoM/xBHfThInw/Xz4BL87RN5luiPEWeOk5CcFxK2gxAnfdfF4wm24adp2TJlnUSwI         MJV+PAJlb0he3cNVubKRh/B9cW6WnsVc7489p9MwqlHqYsCVg1gEGxzyOqXUocYr/usJ         CWfQ==
X-Gm-Message-State: AE9vXwOjeeiVLz+xOxfgF62opM8VbVdvg7yf+SYSfxv6PXSZisV19PiWtLmKfz6tQEo1bQ==
X-Received: by 10.200.38.147 with SMTP id 19mr23858293qto.67.1473723042414;        Mon, 12 Sep 2016 16:30:42 -0700 (PDT)
Content-Type: text/plain; charset=windows-1252
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\))
Subject: Re: unzip, find broken by auto handling of .exe file extension
From: Stephen Anderson <stephen.rhoderson@gmail.com>
In-Reply-To: <c1c88c4e-bdb5-b750-7ae3-fdd565a70c2e@gmail.com>
Date: Mon, 12 Sep 2016 19:30:40 -0400
Message-Id: <F4E41EBA-31C7-42F7-BDDB-2DFE840B092B@gmail.com>
References: <5D13B45DBC02439BB6983CB46A306103@skywavemobile.com> <0D835E9B9CD07F40A48423F80D3B5A704BB9586B@USA7109MB022.na.xerox.net> <493DBECE9DB54588A55BDB6921F73079@skywavemobile.com> <c1c88c4e-bdb5-b750-7ae3-fdd565a70c2e@gmail.com>
To: cygwin@cygwin.com
X-IsSubscribed: yes
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u8CNV9Eg017769


> On Sep 12, 2016, at 4:53 PM, Marco Atzeri <marco.atzeri@gmail.com> wrote:
> 
> On 12/09/2016 21:12, Stephen Anderson wrote:
>> Thanks Ken, good observation.
>> 
>>   -----Original Message-----
>>> From: Nellis, Kenneth
>>> From: Stephen Anderson >
>>> > See also:
>>> >
>>> > http://stackoverflow.com/questions/32467871/unzip-gives-checkdir-error-
>>> > directory-exists-but-is-not-a-directory#32468314
>>> >
>>> > The fact that 7z handles this and unzip does not indicates that the
>>> > problem is fixable..
>> 
>>> FWIW, it seems that the same issue is present with tar:
>>> <Ken demonstrates broken tar handling>
>> 
>> This means that you can't reliably extract from a tar or zip archive in
>> cygwin.
>> The windoze equivalents do not have this problem.
>> It looks to me like the approach of equating filenames 'foo' and
>> 'foo.exe' is dangerous at the stat(2) level - apparently windoze
>> accomplishes the same trick in a much less destructive way.
>> 
>> sja
>> 
> 
> This characteristics is needed as windows for historical reason
> requested  ".exe" extension for all executable files, while
> Unix have not such restriction.
> 
> So "cat.exe" is recognized by cygwin also as "cat".
> Without this feature all scripts taken by traditional Unix's will
> be broken and cygwin will be unusable.
> 
> Try this experiment on Linux:
> 
> touch foo
> mkdir foo
> 
> does it work ?

This is not relevant, there is no foo, there is only foo.exe.

In the case of windows _command_ processing, certain extensions are searched for automatically without creating an equivalency in file names. This means that for the same directory and filename hierarchy, windows and linux archive processing work, cygwin uniquely fails. Not a desirable outcome.

IMHO the only time cygwin should be looking for .exe (or .cmd, .bat etc if desired), is when no match is found on loading a _command_, possibly only from a shell.

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


