Skip to content

Commit

Permalink
Merge pull request #1508 from franciscoRdiaz/iss_1507
Browse files Browse the repository at this point in the history
  • Loading branch information
fusesource-ci authored May 2, 2019
2 parents 141668a + a4af4aa commit a6e967b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Bugs

* Fix #1500: exec `redirectingInput` was not correctly setting the input pipe (since 4.2.0).
* Fix #1507: remove unnecessary OutputStream copying a directory and return the directory object instead the file object when a directory is copied or read

Improvements

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public Boolean copy(Path destination) {
copyFile(getContext().getFile(), destination.toFile());
return true;
} else if (Utils.isNotNullOrEmpty(getContext().getDir())) {
copyDir(getContext().getFile(), destination.toFile());
copyDir(getContext().getDir(), destination.toFile());
return true;
}
throw new IllegalStateException("No file or dir has been specified");
Expand All @@ -331,7 +331,7 @@ public InputStream read() {
if (Utils.isNotNullOrEmpty(getContext().getFile())) {
return readFile(getContext().getFile());
} else if (Utils.isNotNullOrEmpty(getContext().getDir())) {
return readTar(getContext().getFile());
return readTar(getContext().getDir());
}
throw new IllegalStateException("No file or dir has been specified");
} catch (Exception e) {
Expand Down Expand Up @@ -483,7 +483,6 @@ public void run() {
}
try (
InputStream is = readTar(source);
OutputStream os = new FileOutputStream(destination);
org.apache.commons.compress.archivers.tar.TarArchiveInputStream tis = new org.apache.commons.compress.archivers.tar.TarArchiveInputStream(is))

{
Expand Down

0 comments on commit a6e967b

Please sign in to comment.