delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/06/27/18:36:05

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-Id: <5.1.0.14.2.20010628002331.03716288@imap.mscha.org>
X-Sender: ml AT imap DOT mscha DOT org (Unverified)
X-Mailer: QUALCOMM Windows Eudora Version 5.1
Date: Thu, 28 Jun 2001 00:29:49 +0200
To: cygwin <cygwin AT cygwin DOT com>
From: Michael Schaap <cygwin AT mscha DOT com>
Subject: Patch for zip to deal with dos paths
Mime-Version: 1.0
X-Virus-Scanned: at mscha.com by AMaViSd snapshot-20010407 (http://amavis.org/)

--=====================_30171314==_
Content-Type: text/plain; charset="us-ascii"; format=flowed

Hi all,

For what it's worth.  Here's a patch to zip that fixes the behaviour with 
regard to dos path names.  It deals with two issues:
  - backslashes are converted to slashes,
  - drive names are stripped when converting an absolute to relative path.

The behaviour of cygwin zip with this patch is the same as the native win32 
version.  In fact, the code added to unix/unix.c essentially comes from 
win32/win32zip.c (slightly simplified).

Of course, this breaks the feature of using NTFS streams with a single 
character file name.  ;-)

Take it or leave it,

  - Michael
--=====================_30171314==_
Content-Type: application/octet-stream; name="zip_dosnames.patch"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="zip_dosnames.patch"

LS0tIHVuaXgvdW5peC5jLk9SSUcJU3VuIE5vdiAgNyAxNTowODoyMSAxOTk5CisrKyB1bml4L3Vu
aXguYwlUaHUgSnVuIDI4IDAwOjE2OjM2IDIwMDEKQEAgLTIxNiw2ICsyMTYsMTQgQEAKICAgZG9z
ZmxhZyA9IGRvc2lmeTsgIC8qIGRlZmF1bHQgZm9yIG5vbi1ET1MgYW5kIG5vbi1PUy8yICovCiAK
ICAgLyogRmluZCBzdGFydGluZyBwb2ludCBpbiBuYW1lIGJlZm9yZSBkb2luZyBtYWxsb2MgKi8K
KyNpZmRlZiBfX0NZR1dJTl9fCisgIC8qIFN0cmlwIGRyaXZlIHNwZWNpZmljYXRpb24gKi8KKyAg
dCA9ICp4ICYmIGlzYXNjaWkoKHVjaCkqeCkgJiYgKih4ICsgMSkgPT0gJzonID8geCArIDIgOiB4
OworICAvKiBDb252ZXJ0IGJhY2tzbGFzaGVzIHRvIHNsYXNoZXMgKi8KKyAgZm9yIChuID0gdDsg
Km47IG4rKykKKyAgICBpZiAoKm4gPT0gJ1xcJykKKyAgICAgICpuID0gJy8nOworI2VuZGlmCiAg
IC8qIFN0cmlwICIvL2hvc3Qvc2hhcmUvIiBwYXJ0IG9mIGEgVU5DIG5hbWUgKi8KICAgaWYgKCFz
dHJuY21wKHgsIi8vIiwyKSAmJiAoeFsyXSAhPSAnXDAnICYmIHhbMl0gIT0gJy8nKSkgewogICAg
IG4gPSB4ICsgMjsKQEAgLTIyOCw4ICsyMzYsMTIgQEAKICAgICB9CiAgICAgaWYgKCpuICE9ICdc
MCcpCiAgICAgICB0ID0gbiArIDE7CisjaWZkZWYgX19DWUdXSU5fXworICB9CisjZWxzZQogICB9
IGVsc2UKICAgICAgIHQgPSB4OworI2VuZGlmCiAgIHdoaWxlICgqdCA9PSAnLycpCiAgICAgdCsr
OyAgICAgICAgICAgICAgICAvKiBzdHJpcCBsZWFkaW5nICcvJyBjaGFycyB0byBnZXQgYSByZWxh
dGl2ZSBwYXRoICovCiAgIHdoaWxlICgqdCA9PSAnLicgJiYgdFsxXSA9PSAnLycpCg==

--=====================_30171314==_
Content-Type: text/plain; charset=us-ascii

--
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/
--=====================_30171314==_--

- Raw text -


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