You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2019/12/06 11:31:17 UTC

[GitHub] [commons-compress] tcurdt commented on a change in pull request #87: COMPRESS-124 : Add support for extracting sparse entries from tar archives

tcurdt commented on a change in pull request #87: COMPRESS-124 : Add support for extracting sparse entries from tar archives
URL: https://github.com/apache/commons-compress/pull/87#discussion_r354789475
 
 

 ##########
 File path: src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
 ##########
 @@ -516,6 +713,22 @@ private void paxHeaders() throws IOException{
                                 final String value = new String(rest, 0,
                                                           restLen - 1, CharsetNames.UTF_8);
                                 headers.put(keyword, value);
+
+                                // for 0.0 PAX Headers
+                                if(keyword.equals("GNU.sparse.offset")) {
+                                    sparseHeader = new TarArchiveStructSparse(Long.parseLong(value), 0);
 
 Review comment:
   better extract the keys into a static String

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services