[
https://issues.apache.org/jira/browse/COMPRESS-558?focusedWorklogId=511279&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-511279
]
ASF GitHub Bot logged work on COMPRESS-558:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 13/Nov/20 09:27
Start Date: 13/Nov/20 09:27
Worklog Time Spent: 10m
Work Description: theobisproject opened a new pull request #151:
URL: https://github.com/apache/commons-compress/pull/151
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 511279)
Remaining Estimate: 0h
Time Spent: 10m
> Current master fails to extract ActiveMQ tar archive
> ----------------------------------------------------
>
> Key: COMPRESS-558
> URL: https://issues.apache.org/jira/browse/COMPRESS-558
> Project: Commons Compress
> Issue Type: Bug
> Affects Versions: 1.21
> Reporter: Robin Schimpf
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> While version 1.20 is able to extract the ActiveMQ tar archive which can be
> found here ([https://activemq.apache.org/components/classic/download/]) the
> current master fails at extracting it with the following exception
> {code:java}
> java.io.IOException: Error detected parsing the header
> at
> org.apache.commons.compress.archivers.tar.TarArchiveInputStream.getNextTarEntry(TarArchiveInputStream.java:385)
> {code}
> I made a bisect search and this reveals the error is introduced with
> COMPRESS-509. I made an analysis and found the following why the problem
> appears
> * Error ist thrown after reading a file in the tar but the file has a "/" at
> the end
> * In the currEntry.isGNULongNameEntry the currEntry.isDirectory evaluates to
> true for this file -> reason why the "/" is appended
> * The underlying problem is that isDirectory also checks if the entry has a
> "/" at the end. But the decoded file name is not yet set in the currEntry.
> Since the entry before the file is a folder the name ends with "/" and
> isDirectory returns the wrong value
> Since I already came this far I'll send a pulll request where the decoded
> name is set before checking if we need to append "/" to the entry name. With
> this change the ActiveMQ tar can be extracted correctly again.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)