renqianlong 1 年之前
父节点
当前提交
03eafa9939

+ 4 - 2
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/UserServiceImpl.java

@@ -2353,8 +2353,10 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
 //                删除压缩包
                 Path zipPathStr = Paths.get(zipPath);
                 Stream<Path> zipWalk = Files.walk(zipPathStr);
-                zipWalk.sorted(Comparator.reverseOrder())
-                        .forEach(FileUtils::deleteDirectoryStream);
+                if (ObjectUtil.isNotEmpty(zipWalk)){
+                    zipWalk.sorted(Comparator.reverseOrder())
+                            .forEach(FileUtils::deleteDirectoryStream);
+                }
                 //删除文件夹
                 if(StringUtils.isNotBlank(toPath)){
                     FileUtils.deleteFilePackage(toPath);