Use DeletingFileInputStream in tar method

This commit is contained in:
Michael Walker 2018-02-26 14:19:02 +00:00
parent 3c86eb0d52
commit 55cb41f5b2

View file

@ -68,7 +68,7 @@ public class Tar {
tmp.deleteOnExit();
try (FileOutputStream target = new FileOutputStream(tmp)) {
tarTo(fileOrDir, target);
return new FileInputStream(tmp);
return new DeletingFileInputStream(tmp);
}
}