improved semantic of tarDirectoryTree
This commit is contained in:
parent
35794b0ff1
commit
3ef3009ea0
@ -92,7 +92,6 @@ public class SibaManager
|
||||
}
|
||||
else
|
||||
{
|
||||
int pathLength = fileToSave.getParentFile().getAbsolutePath().length();
|
||||
LocalDateTime date = LocalDateTime.now();
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH'h'mm'mn'ss's'");
|
||||
String textDate = date.format(formatter);
|
||||
@ -101,7 +100,7 @@ public class SibaManager
|
||||
gzipOutputStream = new GzipCompressorOutputStream(
|
||||
new BufferedOutputStream(new FileOutputStream(result)));
|
||||
out = new TarArchiveOutputStream(gzipOutputStream);
|
||||
SibaUtils.tarDirectoryTree(fileToSave, out, pathLength);
|
||||
SibaUtils.tarDirectoryTree(fileToSave, out);
|
||||
out.close();
|
||||
createMD5File(result, target + "/" + outputFileNameWithoutExtension + ".tgz.md5");
|
||||
}
|
||||
|
@ -151,6 +151,19 @@ public class SibaUtils
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param fileToSave
|
||||
* @param outputStream
|
||||
* @throws IOException
|
||||
*/
|
||||
public static void tarDirectoryTree(final File fileToSave, final TarArchiveOutputStream outputStream)
|
||||
throws IOException
|
||||
{
|
||||
int pathLength = fileToSave.getParentFile().getAbsolutePath().length();
|
||||
tarDirectoryTree(fileToSave, outputStream, pathLength);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* This method generates ArchiveEntry.
|
||||
|
Loading…
Reference in New Issue
Block a user