removed os dependant file separator

This commit is contained in:
Didier Clermonté 2016-08-28 12:41:44 +02:00
parent 1a673cc9d6
commit dccd3e926e

View File

@ -105,13 +105,14 @@ public final class SibaManager
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH'h'mm'mn'ss's'");
String textDate = date.format(formatter);
String outputFileNameWithoutExtension = fileToSave.getName() + "-" + textDate;
result = new File(target + "/" + outputFileNameWithoutExtension + ".tgz");
result = new File(target, outputFileNameWithoutExtension + ".tgz");
OutputStream gzipOutputStream = new GzipCompressorOutputStream(
new BufferedOutputStream(new FileOutputStream(result)));
out = new TarArchiveOutputStream(gzipOutputStream);
SibaUtils.tarDirectoryTree(fileToSave, out);
out.close();
SibaUtils.createMD5File(result, target + "/" + outputFileNameWithoutExtension + ".tgz.md5");
String fileSeparator = System.getProperty("file.separator");
SibaUtils.createMD5File(result, target + fileSeparator + outputFileNameWithoutExtension + ".tgz.md5");
}
}
catch (IOException exception)