delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/09/09/09:59:45

X-Recipient: archive-cygwin AT delorie DOT 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:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; q=dns; s=default; b=XoXCcTwaqwwDT4Yhmmz3ywowDpbW6
a7Ta1CnJdmJ6GUEJ4+qHPRma6Zzz96EtNlK4mQwATV5FCQlNwOEjgw+OA3xhUrQG
Pm7N+mAf977f0ZS19n2bjkEOtT9NCw8Sp1SkPti0ifF1xkhAa2c1tkeNYZ9E9wTV
ELqwkCMAlqUfk8=
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:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; s=default; bh=c8v8a1AeCKEjNWs2vyMzigcuJ34=; b=Iq9
1x44BN9R5XSRv400TKBxxw1dpOeVo3QB0YXS/uKb5JO+a2M9O4s7K2BWPqRHpw+U
H9beLxip226is2mNdpdpaC1lpGsB1uv6XQ+nBbqXxlICY/gykE4iUMlz3zO0RLMt
5EIf5qWHAocm2M+Y+lrH/WMC2bjPh6qUnD6Ec8zk=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.6 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=nellis, Nellis, unzip, sk:unzip-g
X-HELO: USA7109MR005.ACS-INC.COM
From: "Nellis, Kenneth" <Kenneth DOT Nellis AT xerox DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: RE: unzip, find broken by auto handling of .exe file extension
Date: Fri, 9 Sep 2016 13:59:13 +0000
Message-ID: <0D835E9B9CD07F40A48423F80D3B5A704BB9586B@USA7109MB022.na.xerox.net>
References: <5D13B45DBC02439BB6983CB46A306103 AT skywavemobile DOT com>
In-Reply-To: <5D13B45DBC02439BB6983CB46A306103@skywavemobile.com>
MIME-Version: 1.0
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u89Dxc5W015224

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:

$ touch foo.exe
$ mkdir -v foo
mkdir: created directory 'foo'
$ ls -l
total 0
drwxr-x---+ 1 knellis Domain Users 0 Sep  9 09:46 foo
-rw-r-----  1 knellis Domain Users 0 Sep  9 09:46 foo.exe
$ tar cvf bar.tar foo
foo/
$ rmdir -v foo
rmdir: removing directory, 'foo'
$ tar rvf bar.tar foo
foo
$ rm -v foo
removed 'foo'
$ ls -l
total 12
-rw-r----- 1 knellis Domain Users 10240 Sep  9 09:47 bar.tar
$ tar tf bar.tar
foo/
foo
$ tar xvf bar.tar
foo/
foo
$ ls -l
total 12
-rw-r----- 1 knellis Domain Users 10240 Sep  9 09:47 bar.tar
-rw-r----- 1 knellis Domain Users     0 Sep  9 09:46 foo
$

So, tar indicates that it extracted both directory foo/ and file 
foo, but the result indicates that the file won the conflict.

If tar actually did extract the directory first, I'd think that 
it's next attempt to extract the file with the same name would 
fail, but that's not what happened.

--Ken Nellis

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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019