public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Nellis, Kenneth" <Kenneth.Nellis@xerox.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: RE: unzip, find broken by auto handling of .exe file extension
Date: Fri, 09 Sep 2016 13:59:00 -0000	[thread overview]
Message-ID: <0D835E9B9CD07F40A48423F80D3B5A704BB9586B@USA7109MB022.na.xerox.net> (raw)
In-Reply-To: <5D13B45DBC02439BB6983CB46A306103@skywavemobile.com>

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

  reply	other threads:[~2016-09-09 13:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-01 16:00 Stephen Anderson
2016-09-02 18:40 ` cyg Simple
2016-09-02 20:20   ` Stephen Anderson
2016-09-09 13:18     ` Stephen Anderson
2016-09-09 13:59       ` Nellis, Kenneth [this message]
2016-09-12 20:37         ` Stephen Anderson
2016-09-12 23:30           ` Marco Atzeri
2016-09-12 23:41             ` Stephen Anderson
2016-09-13  1:35               ` Andy Hall
2016-09-13  8:00               ` Marco Atzeri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0D835E9B9CD07F40A48423F80D3B5A704BB9586B@USA7109MB022.na.xerox.net \
    --to=kenneth.nellis@xerox.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).