From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48437 invoked by alias); 13 Sep 2016 00:14:39 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 48426 invoked by uid 89); 13 Sep 2016 00:14:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.1 required=5.0 tests=AWL,BAYES_40,CYGWIN_OWNER_BODY,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=no version=3.3.2 spammy=longtime, long-time, H*MI:comcast, Hx-languages-length:3111 X-HELO: resqmta-po-02v.sys.comcast.net Received: from resqmta-po-02v.sys.comcast.net (HELO resqmta-po-02v.sys.comcast.net) (96.114.154.161) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 13 Sep 2016 00:14:28 +0000 Received: from resomta-po-16v.sys.comcast.net ([96.114.154.240]) by resqmta-po-02v.sys.comcast.net with SMTP id jbMYboxr91zBdjbMpbIPST; Tue, 13 Sep 2016 00:14:27 +0000 Received: from AndyWork ([73.223.74.29]) by resomta-po-16v.sys.comcast.net with SMTP id jbMobRLNU1VRUjbMobD6vR; Tue, 13 Sep 2016 00:14:27 +0000 From: "Andy Hall" To: "'Stephen Anderson'" , References: <5D13B45DBC02439BB6983CB46A306103@skywavemobile.com> <0D835E9B9CD07F40A48423F80D3B5A704BB9586B@USA7109MB022.na.xerox.net> <493DBECE9DB54588A55BDB6921F73079@skywavemobile.com> In-Reply-To: Subject: RE: unzip, find broken by auto handling of .exe file extension Date: Tue, 13 Sep 2016 01:35:00 -0000 Message-ID: <002a01d20d53$c74bb580$55e32080$@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfJ/AYciEyHNPjP++IZCeJdajw469hT2xEgTMK8U8zz6LTZYRGCFhe0P0EnLHyAJjY3gesVljslJb65Los80IfCxg2792lqaKjb++HTVDtvx95+omz4Xs R3jTNNj2GiCvQUkqYdqPa5r7DVEfVvn+qyfMvwgZPoEY+aVWZ/gsedaNVe6kXO8pI+niZ/bVMOtKe/kvca5jZL7W848nFWK8Rps= X-IsSubscribed: yes X-SW-Source: 2016-09/txt/msg00190.txt.bz2 > From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On Behalf Of Stephen Anderson > Sent: Monday, September 12, 2016 4:31 PM > To: cygwin@cygwin.com > Subject: Re: unzip, find broken by auto handling of .exe file extension > > > > On Sep 12, 2016, at 4:53 PM, Marco Atzeri 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: > >>> > >> > >> 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 Yes, one should expect that the inverse of any file archiving operation would return the original directory structure, possibly with some alterations to permissions and ownership. I have been burned several times by the .exe handling in tar when moving archives back and forth between Linux and Windows. I would agree that this behavior violates the "principle of least astonishment" especially for long-time Unix users. In the past, I have advocated the same solution you proposed. But how does this make commands like "which" and "whereis" which take program names as arguments work properly? adh > -- > 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 -- 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