Skip to content

Commit

Permalink
Merge pull request #332 from basil/tar
Browse files Browse the repository at this point in the history
Migrate from Apache Commons Compress to Ant
  • Loading branch information
jglick authored May 28, 2024
2 parents e804c2f + f6f23eb commit 4c5a185
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
import jenkins.model.Jenkins;
import jenkins.util.BuildListenerAdapter;
import jenkins.util.VirtualFile;
import org.apache.commons.compress.archivers.ArchiveEntry;
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
import org.apache.tools.tar.TarEntry;
import org.apache.tools.tar.TarInputStream;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.kohsuke.accmod.Restricted;
Expand Down Expand Up @@ -235,8 +235,8 @@ public static Map<String,Map<String,String>> stashesOf(@NonNull Run<?,?> build)
result.put(n.substring(0, n.length() - SUFFIX.length()), unpacked);
try (InputStream is = new FileInputStream(kid)) {
InputStream wrapped = FilePath.TarCompression.GZIP.extract(is);
TarArchiveInputStream archiveStream = new TarArchiveInputStream(wrapped);
ArchiveEntry archiveEntry;
TarInputStream archiveStream = new TarInputStream(wrapped);
TarEntry archiveEntry;
while ((archiveEntry = archiveStream.getNextEntry()) != null) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
IOUtils.copy(archiveStream, baos);
Expand Down

0 comments on commit 4c5a185

Please sign in to comment.