Skip to content

Commit

Permalink
fix:文件目录为空时无法删除文件报错
Browse files Browse the repository at this point in the history
  • Loading branch information
chopper711 committed May 27, 2024
1 parent a301432 commit c768268
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ public void batchDelete(List<String> ids) {
List<File> files = this.list(queryWrapper);
List<String> keys = new ArrayList<>();
files.forEach(item -> keys.add(item.getFileKey()));
filePluginFactory.filePlugin().deleteFile(keys);
if(!keys.isEmpty()) {
filePluginFactory.filePlugin().deleteFile(keys);
}
this.remove(queryWrapper);
}

Expand Down

0 comments on commit c768268

Please sign in to comment.