Looly 5 年 前
コミット
e50942efbc

+ 2 - 1
CHANGELOG.md

@@ -3,10 +3,11 @@
 
 
 -------------------------------------------------------------------------------------------------------------
 -------------------------------------------------------------------------------------------------------------
 
 
-## 5.3.10 (2020-07-12)
+## 5.3.10 (2020-07-14)
 
 
 ### 新特性
 ### 新特性
 ### Bug修复
 ### Bug修复
+* 【core   】     修复ZipUtil中finish位于循环内的问题(issue#961@Github)
 
 
 -------------------------------------------------------------------------------------------------------------
 -------------------------------------------------------------------------------------------------------------
 ## 5.3.9 (2020-07-12)
 ## 5.3.9 (2020-07-12)

+ 1 - 1
hutool-core/src/main/java/cn/hutool/core/util/ZipUtil.java

@@ -228,8 +228,8 @@ public class ZipUtil {
 				// 调用递归压缩方法进行目录或文件压缩
 				// 调用递归压缩方法进行目录或文件压缩
 				zip(srcFile, srcRootDir, zipOutputStream, filter);
 				zip(srcFile, srcRootDir, zipOutputStream, filter);
 				zipOutputStream.flush();
 				zipOutputStream.flush();
-				zipOutputStream.finish();
 			}
 			}
+			zipOutputStream.finish();
 		} catch (IOException e) {
 		} catch (IOException e) {
 			throw new IORuntimeException(e);
 			throw new IORuntimeException(e);
 		}
 		}