修复CompressUtil.createArchiver 将文件压缩为tgz时文件名规则无效问题

This commit is contained in:
Looly
2023-07-18 00:01:20 +08:00
parent 25b831c214
commit db9d812cd4
2 changed files with 9 additions and 9 deletions

View File

@@ -86,14 +86,13 @@ public class StreamArchiver implements Archiver {
} catch (IOException e) {
throw new IORuntimeException(e);
}
return;
}
final ArchiveStreamFactory factory = new ArchiveStreamFactory(charset.name());
try {
this.out = factory.createArchiveOutputStream(archiverName, targetStream);
} catch (ArchiveException e) {
throw new CompressException(e);
} else {
final ArchiveStreamFactory factory = new ArchiveStreamFactory(charset.name());
try {
this.out = factory.createArchiveOutputStream(archiverName, targetStream);
} catch (ArchiveException e) {
throw new CompressException(e);
}
}
//特殊设置