Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Date: Tue, 26 Jun 2001 11:20:13 -0400
From: Christopher Faylor <cygwin@cygwin.com>
To: "Fred T. Hamster" <fred@gruntose.com>
Cc: cygwin@cygwin.com
Subject: Re: two problems with cygwin's zip
Message-ID: <20010626112013.A7369@redhat.com>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: "Fred T. Hamster" <fred@gruntose.com>, cygwin@cygwin.com
References: <3B38A4B7.6040803@gruntose.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.11i
In-Reply-To: <3B38A4B7.6040803@gruntose.com>; from fred@gruntose.com on Tue, Jun 26, 2001 at 11:05:27AM -0400

On Tue, Jun 26, 2001 at 11:05:27AM -0400, Fred T. Hamster wrote:
>i have checked the faq and the mailing list and don't find the totally 
>relevant answers, so here are the problems...
>
>1) zip saves absolute paths in the zipfile.  for example, if i zip up 
>"l:\source\lib_src\library\basis"/* into a zip file, all of the files in 
>the archive start with "l:\".  this leads, on unzipping, for zip to want 
>to write them back into "l:\" rather than unzipping into the current 
>directory.  that is clearly a bad choice if my files on l:\ are somewhat 
>better versions than those in the zip.
>  the infozip distribution doesn't exhibit this behavior in the dos 
>port; instead, it chops off the absolutist part of the path and leaves 
>it as "source\lib_src\library\basis".
>  note that using the -j flag to junk the paths is not appropriate; my 
>zip files often contain 50-100 directories.  i definitely don't want 
>them to all be dropped into the same directory on unzipping.

Cygwin is a UNIX emulation environment.  The cygwin zip program is a
UNIX port.  It probably doesn't know that \ is equivalent to /.

We don't guarantee that every port of every utility that is distributed
with cygwin will properly handle MS-DOS path syntax.  I don't think
that many package maintainers even care about this.

So, use forward slashes in your filenames.  That is one of the whole
reasons for Cygwin -- the ability to use UNIX paths.

If you don't want to use Cygwin's UNIX path name facilities then you
should just be using a native zip port.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

