Issue#38 Moved gzipOutputStream declaration

This commit is contained in:
Didier Clermonté 2016-06-30 23:02:32 +02:00
parent ccc9dcf763
commit 7db3a7dca4
1 changed files with 1 additions and 2 deletions

View File

@ -77,7 +77,6 @@ public class SibaManager
TarArchiveOutputStream out = null;
try
{
OutputStream gzipOutputStream = null;
if ((fileToSave == null) || !fileToSave.exists())
{
throw new SibaException(BUNDLE.getString("sourceNotExist.text"));
@ -97,7 +96,7 @@ public class SibaManager
String textDate = date.format(formatter);
String outputFileNameWithoutExtension = fileToSave.getName() + "-" + textDate;
result = new File(target + "/" + outputFileNameWithoutExtension + ".tgz");
gzipOutputStream = new GzipCompressorOutputStream(
OutputStream gzipOutputStream = new GzipCompressorOutputStream(
new BufferedOutputStream(new FileOutputStream(result)));
out = new TarArchiveOutputStream(gzipOutputStream);
SibaUtils.tarDirectoryTree(fileToSave, out);