diff --git a/core/src/main/java/hudson/FilePath.java b/core/src/main/java/hudson/FilePath.java index 3d2bd461ac..4e9144bc46 100644 --- a/core/src/main/java/hudson/FilePath.java +++ b/core/src/main/java/hudson/FilePath.java @@ -1143,7 +1143,7 @@ public final class FilePath implements Serializable { Future future = target.actAsync(new FileCallable() { public Void invoke(File f, VirtualChannel channel) throws IOException { try { - readFromTar(remote+'/'+fileMask, f,new GZIPInputStream(pipe.getIn())); + readFromTar(remote+'/'+fileMask, f,TarCompression.GZIP.extract(pipe.getIn())); return null; } finally { pipe.getIn().close(); @@ -1171,7 +1171,7 @@ public final class FilePath implements Serializable { } }); try { - readFromTar(remote+'/'+fileMask,new File(target.remote),new GZIPInputStream(pipe.getIn())); + readFromTar(remote+'/'+fileMask,new File(target.remote),TarCompression.GZIP.extract(pipe.getIn())); } catch (IOException e) {// BuildException or IOException try { future.get(3,TimeUnit.SECONDS);