Issue#38 Moved gzipOutputStream declaration
This commit is contained in:
parent
ccc9dcf763
commit
7db3a7dca4
|
@ -77,7 +77,6 @@ public class SibaManager
|
||||||
TarArchiveOutputStream out = null;
|
TarArchiveOutputStream out = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
OutputStream gzipOutputStream = null;
|
|
||||||
if ((fileToSave == null) || !fileToSave.exists())
|
if ((fileToSave == null) || !fileToSave.exists())
|
||||||
{
|
{
|
||||||
throw new SibaException(BUNDLE.getString("sourceNotExist.text"));
|
throw new SibaException(BUNDLE.getString("sourceNotExist.text"));
|
||||||
|
@ -97,7 +96,7 @@ public class SibaManager
|
||||||
String textDate = date.format(formatter);
|
String textDate = date.format(formatter);
|
||||||
String outputFileNameWithoutExtension = fileToSave.getName() + "-" + textDate;
|
String outputFileNameWithoutExtension = fileToSave.getName() + "-" + textDate;
|
||||||
result = new File(target + "/" + outputFileNameWithoutExtension + ".tgz");
|
result = new File(target + "/" + outputFileNameWithoutExtension + ".tgz");
|
||||||
gzipOutputStream = new GzipCompressorOutputStream(
|
OutputStream gzipOutputStream = new GzipCompressorOutputStream(
|
||||||
new BufferedOutputStream(new FileOutputStream(result)));
|
new BufferedOutputStream(new FileOutputStream(result)));
|
||||||
out = new TarArchiveOutputStream(gzipOutputStream);
|
out = new TarArchiveOutputStream(gzipOutputStream);
|
||||||
SibaUtils.tarDirectoryTree(fileToSave, out);
|
SibaUtils.tarDirectoryTree(fileToSave, out);
|
||||||
|
|
Loading…
Reference in New Issue