Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 282C79947 for ; Tue, 28 Feb 2012 13:36:00 +0000 (UTC) Received: (qmail 94799 invoked by uid 500); 28 Feb 2012 13:35:59 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 94693 invoked by uid 500); 28 Feb 2012 13:35:59 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 94680 invoked by uid 99); 28 Feb 2012 13:35:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 13:35:59 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of sebbaz@gmail.com designates 209.85.214.171 as permitted sender) Received: from [209.85.214.171] (HELO mail-tul01m020-f171.google.com) (209.85.214.171) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2012 13:35:52 +0000 Received: by obcuy19 with SMTP id uy19so8405894obc.30 for ; Tue, 28 Feb 2012 05:35:31 -0800 (PST) Received-SPF: pass (google.com: domain of sebbaz@gmail.com designates 10.182.15.70 as permitted sender) client-ip=10.182.15.70; Authentication-Results: mr.google.com; spf=pass (google.com: domain of sebbaz@gmail.com designates 10.182.15.70 as permitted sender) smtp.mail=sebbaz@gmail.com; dkim=pass header.i=sebbaz@gmail.com Received: from mr.google.com ([10.182.15.70]) by 10.182.15.70 with SMTP id v6mr7551546obc.13.1330436131401 (num_hops = 1); Tue, 28 Feb 2012 05:35:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=p0WxVHjd2ym+zlRvAoh3QFIKmbaRCIbmC159sqA+Nv8=; b=So7vYMhgJeW8tiMdSo1yQYpfg3rNoHZ6CSZMqwB54Mb+OBoFNfAzkTP9CP96+p3os8 mGA3iDYS0C7gdYxqijt5Q8rhXiKwZSZxAFQwBCLSTXpreaJYqD1IShVu+hr+KbUJxOlE buqQu/yVZrxanrOyiRwqm/rB+Lv5FZT2W4wjo= MIME-Version: 1.0 Received: by 10.182.15.70 with SMTP id v6mr6281531obc.13.1330436131343; Tue, 28 Feb 2012 05:35:31 -0800 (PST) Received: by 10.182.85.5 with HTTP; Tue, 28 Feb 2012 05:35:31 -0800 (PST) In-Reply-To: <20120228050027.935F42388A32@eris.apache.org> References: <20120228050027.935F42388A32@eris.apache.org> Date: Tue, 28 Feb 2012 13:35:31 +0000 Message-ID: Subject: Re: svn commit: r1294460 - in /commons/proper/compress/trunk/src: changes/ main/java/org/apache/commons/compress/archivers/zip/ test/java/org/apache/commons/compress/archivers/zip/ test/resources/ From: sebb To: dev@commons.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On 28 February 2012 05:00, wrote: > Author: bodewig > Date: Tue Feb 28 05:00:26 2012 > New Revision: 1294460 > > URL: http://svn.apache.org/viewvc?rev=3D1294460&view=3Drev > Log: > add workaround for broken implementations that use backslashes rather tha= n slashes in file names. =A0COMPRESS-176 > > Added: > =A0 =A0commons/proper/compress/trunk/src/test/java/org/apache/commons/com= press/archivers/zip/ZipArchiveInputStreamTest.java =A0 (with props) > =A0 =A0commons/proper/compress/trunk/src/test/resources/test-winzip.zip = =A0 (with props) > Modified: > =A0 =A0commons/proper/compress/trunk/src/changes/changes.xml > =A0 =A0commons/proper/compress/trunk/src/main/java/org/apache/commons/com= press/archivers/zip/ZipArchiveEntry.java > =A0 =A0commons/proper/compress/trunk/src/test/java/org/apache/commons/com= press/archivers/zip/ZipFileTest.java > > Modified: commons/proper/compress/trunk/src/changes/changes.xml > URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/chang= es/changes.xml?rev=3D1294460&r1=3D1294459&r2=3D1294460&view=3Ddiff > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- commons/proper/compress/trunk/src/changes/changes.xml (original) > +++ commons/proper/compress/trunk/src/changes/changes.xml Tue Feb 28 05:0= 0:26 2012 > @@ -46,6 +46,10 @@ The type attribute can be add,u > =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0description=3D"Release 1.4"> > + =A0 =A0 =A0 > + =A0 =A0 =A0 =A0Added a workaround for a Bug in WinZIP which uses backsl= ashes > + =A0 =A0 =A0 =A0as path separators in Unicode Extra Fields. > + =A0 =A0 =A0 > =A0 =A0 =A0 > =A0 =A0 =A0 =A0 ArrayOutOfBounds while decompressing bz2. Added test case= - code already seems to have been fixed. > =A0 =A0 =A0 > > Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/= compress/archivers/zip/ZipArchiveEntry.java > URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/= java/org/apache/commons/compress/archivers/zip/ZipArchiveEntry.java?rev=3D1= 294460&r1=3D1294459&r2=3D1294460&view=3Ddiff > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- commons/proper/compress/trunk/src/main/java/org/apache/commons/compre= ss/archivers/zip/ZipArchiveEntry.java (original) > +++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compre= ss/archivers/zip/ZipArchiveEntry.java Tue Feb 28 05:00:26 2012 > @@ -509,6 +509,10 @@ public class ZipArchiveEntry extends jav > =A0 =A0 =A0* @param name the name to use > =A0 =A0 =A0*/ > =A0 =A0 protected void setName(String name) { > + =A0 =A0 =A0 =A0if (name !=3D null && getPlatform() =3D=3D PLATFORM_FAT > + =A0 =A0 =A0 =A0 =A0 =A0&& name.indexOf("/") =3D=3D -1) { > + =A0 =A0 =A0 =A0 =A0 =A0name =3D name.replace('\\', '/'); > + =A0 =A0 =A0 =A0} > =A0 =A0 =A0 =A0 this.name =3D name; > =A0 =A0 } The original problem is with unicode extra fields only. Would it not be safer to apply the fix to the method setNameAndCommentFromExtraFields where it actually calls setName? --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org