Skip to content

Commit

Permalink
use the SkipShieldingInputStream
Browse files Browse the repository at this point in the history
  • Loading branch information
Arne Babenhauserheide committed Jul 7, 2018
1 parent 6db69fb commit 3f9c2ce
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/freenet/client/ArchiveManager.java
Expand Up @@ -37,7 +37,6 @@
import freenet.support.io.BucketTools;
import freenet.support.io.Closer;
import freenet.support.io.SkipShieldingInputStream;

import net.contrapunctus.lzma.LzmaInputStream;

/**
Expand Down Expand Up @@ -349,16 +348,14 @@ public void run() {
wrapper = null;
}

if(ARCHIVE_TYPE.ZIP == archiveType)
if(ARCHIVE_TYPE.ZIP == archiveType) {
handleZIPArchive(ctx, key, is, element, callback, gotElement, throwAtExit, context);
else if(ARCHIVE_TYPE.TAR == archiveType) {
// COMPRESS-449 workaround, see https://freenet.mantishub.io/view.php?id=6921
byte[] buf = new byte[(int) archiveSize];
is.read(buf);
} else if(ARCHIVE_TYPE.TAR == archiveType) {
// COMPRESS-449 workaround, see https://freenet.mantishub.io/view.php?id=6921
handleTARArchive(ctx, key, new SkipShieldingInputStream(is), element, callback, gotElement, throwAtExit, context);
}
else
} else {
throw new ArchiveFailureException("Unknown or unsupported archive algorithm " + archiveType);
}
if(wrapper != null) {
Exception e = wrapper.get();
if(e != null) throw new ArchiveFailureException("An exception occured decompressing: "+e.getMessage(), e);
Expand Down

0 comments on commit 3f9c2ce

Please sign in to comment.