Fix: unexpected querying all files when deleting an empty folder (#1469)

This commit is contained in:
topjohncian
2022-09-29 09:26:30 +08:00
committed by GitHub
parent b1685d2863
commit 88e10aeaa2
2 changed files with 17 additions and 0 deletions

View File

@@ -186,6 +186,10 @@ func RemoveFilesWithSoftLinks(files []File) ([]File, error) {
// 结果值
filteredFiles := make([]File, 0)
if len(files) == 0 {
return filteredFiles, nil
}
// 查询软链接的文件
var filesWithSoftLinks []File
tx := DB