[
https://issues.apache.org/jira/browse/COMPRESS-603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17488565#comment-17488565
]
Peter Lee commented on COMPRESS-603:
------------------------------------
So this is a tar.gz archive, instead of a tar?
I tested with code at tag {_}rel/1.21{_}, and it works well. My test code is :
{code:java}
@Test
public void testCompress603() throws IOException, ArchiveException {
try (final InputStream is = new FileInputStream(getFile("test.tar.gz"))) {
final InputStream gin = new GZIPInputStream(is);
final TarArchiveInputStream tin = new TarArchiveInputStream(gin);
new Expander().expand(tin, resultDir);
}
} {code}
> Expander does not support archives with archive entries beginning with ./
> -------------------------------------------------------------------------
>
> Key: COMPRESS-603
> URL: https://issues.apache.org/jira/browse/COMPRESS-603
> Project: Commons Compress
> Issue Type: Bug
> Components: Archivers
> Affects Versions: 1.21
> Reporter: Matt Sicker
> Priority: Major
> Attachments: test.tar.gz
>
>
> Suppose I create a tar file from a directory like so:
>
> {code:java}
> tar -cf foo.tar ./foo{code}
> When I try to extract the tar entries using the Expander class, that throws a
> java.io.IOException: Expanding ./ would create file outside of ...
> When I create the tar file without the leading ./, then Expander doesn't
> complain.
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)