sudipta1411 / jtar

Automatically exported from code.google.com/p/jtar
0 stars 0 forks source link

bytesRead shows wrong value in TarInputStream #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. bytesRead in TarInputStream shows wrong count every time
2.
3.

What is the expected output? What do you see instead?
Current bytes read count

What version of the product are you using? On what operating system?
jtar 1.1

Please provide any additional information below.
 if (!eof) {
             bytesRead += header.length;
             currentEntry = new TarEntry( header );
        }
in TarInputStream.java is problem.
It should do bytesRead += header.length; for last 1024 bytes of tar stream i.e. 
when eof is true and not when its false. It inflates bytesRead count 
significantly. 

Original issue reported on code.google.com by nsupe...@gmail.com on 13 Jul 2012 at 7:17