Skip to content
Permalink
Browse files

[JENKINS-38814] Use GREEDY `RemoteInputStream`s (#2583)

(cherry picked from commit b62ad15)
  • Loading branch information
andresrc authored and olivergondza committed Nov 3, 2016
1 parent 2f0632a commit 6edd35d11b384a935aadcdab20baca1a6df8b3d6
Showing with 2 additions and 2 deletions.
  1. +2 −2 core/src/main/java/hudson/FilePath.java
@@ -555,7 +555,7 @@ public Void invoke(File dir, VirtualChannel channel) throws IOException, Interru
* @see #unzip(FilePath)
*/
public void unzipFrom(InputStream _in) throws IOException, InterruptedException {
final InputStream in = new RemoteInputStream(_in);
final InputStream in = new RemoteInputStream(_in, Flag.GREEDY);
act(new SecureFileCallable<Void>() {
public Void invoke(File dir, VirtualChannel channel) throws IOException {
unzip(dir, in);
@@ -724,7 +724,7 @@ public OutputStream compress(OutputStream out) throws IOException {
*/
public void untarFrom(InputStream _in, final TarCompression compression) throws IOException, InterruptedException {
try {
final InputStream in = new RemoteInputStream(_in);
final InputStream in = new RemoteInputStream(_in, Flag.GREEDY);
act(new SecureFileCallable<Void>() {
public Void invoke(File dir, VirtualChannel channel) throws IOException {
readFromTar("input stream",dir, compression.extract(in));

0 comments on commit 6edd35d

Please sign in to comment.