mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复CompressUtil.createArchiver 将文件压缩为tgz时文件名规则无效问题
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
//特殊设置
|
||||
|
Reference in New Issue
Block a user