delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/04/25/10:32:25

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Fri, 25 Apr 2003 10:32:09 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: "Gerrit P. Haase" <gp AT familiehaase DOT de>
cc: cygwin AT cygwin DOT com
Subject: Re: unzip - known problem? (FAQ alert)
In-Reply-To: <9289580454.20030425082231@familiehaase.de>
Message-ID: <Pine.GSO.4.44.0304251023410.10996-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

On Fri, 25 Apr 2003, Gerrit P. Haase wrote:

> Hallo Igor,
>
> Am Donnerstag, 24. April 2003 um 21:39 schriebst du:
> > On Thu, 24 Apr 2003, Gerrit P. Haase wrote:
> >> Hallo Gary,
> >> Am Donnerstag, 24. April 2003 um 16:31 schriebst du:
> >>> Let's say I have a .zip file, test.zip, that contains the following:
> >>>         test/cat.exe
> >>>         test/cat/mouse.exe
> >>> If I do "unzip test.zip" (in an otherwise empty directory), I get the
> >>> following error:
> >>>     checkdir error:  test/cat exists but is not directory
> >>>                      unable to process test/cat/.
> >> $ ls -R
> >> .:
> >> cat/  cat.exe*
> >> ./cat:
> >> mouse.exe*
> >> $ zip -r test .
> >>   adding: cat/ (stored 0%)
> >>   adding: cat/mouse.exe (stored 0%)
> >>   adding: cat.exe (stored 0%)
> >> $ unzip test.zip
> >> Archive:  test.zip
> >>    creating: cat/
> >>  extracting: cat/mouse.exe
> >>  extracting: cat.exe
>
> >> Works for me (tm).
> >> Gerrit
>
> > It doesn't work if "cat.exe" precedes the "cat/" directory in the archive.
> >         Igor
>
> Hmmm, I see.  Well, what do you think would be the easiest, fix stat()
> or s.th. else in Cygwin or is this a feature that is needed for other
> uses and cannot be fixed, or patch unzip to do some more/less checks
> and let it extract independent of some functions opinion?
>
> Gerrit

Gerrit,

IMO, this stat() behavior is an idiosyncracy of Cygwin, and thus this
makes the stat() test in unzip non-portable.  So the unzip source would be
the place to fix this.  A lot of software already has Cygwin-specific
chunks.

To aid in porting, it might be worth it to add a stat_pure() function [or
a parameter to stat(), as has been suggested] that will turn off this
feature.

Perhaps there should be a "What gotchas can I expect when porting software
to Cygwin?" question in the FAQ, with the stat() issue being part of the
answer...
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Knowledge is an unending adventure at the edge of uncertainty.
  -- Leto II


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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