Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复删除文件夹后统计大小不变的问题 #178

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1988,8 +1988,10 @@ public ResponseResult<Object> delete(String username, String currentDirectory, L
if (Boolean.TRUE.equals(fileDocument.getIsFolder())) {
// 删除文件夹及其下的所有文件
List<FileDocument> delFileDocumentList = mongoTemplate.findAllAndRemove(getAllByFolderQuery(fileDocument), FileDocument.class, COLLECTION_NAME);
// 移动到回收站
moveToTrash(username, delFileDocumentList, true);
if (!sweep) {
// 移动到回收站
moveToTrash(username, delFileDocumentList, true);
}
// 提取出delFileDocumentList中文件id
List<String> delFileIds = delFileDocumentList.stream().map(FileDocument::getId).collect(Collectors.toList());
deleteDependencies(username, delFileIds, sweep);
Expand Down