PeterAlfreadLee 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_r350682088
 
 

 ##########
 File path: 
src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
 ##########
 @@ -243,8 +258,16 @@ public long skip(final long n) throws IOException {
             return 0;
         }
 
-        final long available = entrySize - entryOffset;
-        final long skipped = IOUtils.skip(is, Math.min(n, available));
+        long available;
+        long skipped;
+        if(!currEntry.isSparse()) {
 
 Review comment:
   I agree. I will modify this and move the handling to the `getRealSize`.

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


With regards,
Apache Git Services

Reply via email to