Return-Path: Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: (qmail 88749 invoked from network); 12 Apr 2011 23:33:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Apr 2011 23:33:28 -0000 Received: (qmail 11991 invoked by uid 500); 12 Apr 2011 23:33:28 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 11949 invoked by uid 500); 12 Apr 2011 23:33:27 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 11942 invoked by uid 99); 12 Apr 2011 23:33:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Apr 2011 23:33:27 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Apr 2011 23:33:26 +0000 Received: from thor.apache.org (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p3CNX6d8029536 for ; Tue, 12 Apr 2011 23:33:06 GMT Received: (from daemon@localhost) by thor.apache.org (8.13.8+Sun/8.13.8/Submit) id p3CNX6Xx029535; Tue, 12 Apr 2011 19:33:06 -0400 (EDT) Date: Tue, 12 Apr 2011 19:33:06 -0400 (EDT) Message-Id: <201104122333.p3CNX6Xx029535@thor.apache.org> From: bugzilla@apache.org To: notifications@ant.apache.org Subject: DO NOT REPLY [Bug 51026] TarEntry(File) screws up size for directory X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ant X-Bugzilla-Component: Other X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: stamhankar@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: notifications@ant.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 https://issues.apache.org/bugzilla/show_bug.cgi?id=51026 --- Comment #3 from Sandeep Tamhankar 2011-04-12 19:33:04 EDT --- I just downloaded commons-compress, and I can see that the TarArchiveEntry(File, String) constructor does the right thing, so I don't have to work around this issue (or fix it in Ant) at this point. Ant should use commons-compress rather than keeping its current impl. (In reply to comment #2) > Umm... I don't think the TarEntry constructor has been fixed. When I look at > TarEntry.java from the svn link you posted, it clearly shows on line 223: > this.size = file.length(); > > Also, I tried using Ant 1.8.1 before filing the issue and managed to repro it > there as well... although on further thought I may have only tested the > untar'ing side of things (e.g. untar a tar-ball containing some dir entries > with 4k size). > > So this is still an open issue. > > As for commons-compress: it's awesome that this logic has essentially been > factored into a commons library like this. I will definitely move over to that. > Thanks a ton for the tip! > > (In reply to comment #1) > > The TarEntry constructor has been fixed about two years ago with svn revision > > 755231 - this is part of Ant 1.8.0. > > > > Since you seem to be using Ant's tar classes as a library let me suggest you > > take a look at Apache Commons Compress http://commons.apache.org/compress/ > > (which doesn't read tar archives with directories of a size > 0 properly > > either). -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.