ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51026] TarEntry(File) screws up size for directory
Date Tue, 12 Apr 2011 23:33:06 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=51026

--- Comment #3 from Sandeep Tamhankar <stamhankar@gmail.com> 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.

Mime
View raw message