Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-38814] Use GREEDY RemoteInputStreams (#2583)
(cherry picked from commit b62ad15)
  • Loading branch information
andresrc authored and olivergondza committed Nov 3, 2016
1 parent 2f0632a commit 6edd35d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/hudson/FilePath.java
Expand Up @@ -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);
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 6edd35d

Please sign in to comment.