mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: mount storage policy for folders in WebDAV
This commit is contained in:
@@ -190,6 +190,9 @@ func (fs *FileSystem) Delete(ctx context.Context, dirs, files []uint) error {
|
||||
return ErrDBDeleteObjects.WithError(err)
|
||||
}
|
||||
|
||||
// 删除文件记录对应的分享记录
|
||||
model.DeleteShareBySourceIDs(allFileIDs, false)
|
||||
|
||||
// 归还容量
|
||||
var total uint64
|
||||
for _, value := range totalStorage {
|
||||
@@ -207,6 +210,9 @@ func (fs *FileSystem) Delete(ctx context.Context, dirs, files []uint) error {
|
||||
return ErrDBDeleteObjects.WithError(err)
|
||||
}
|
||||
|
||||
// 删除目录记录对应的分享记录
|
||||
model.DeleteShareBySourceIDs(allFolderIDs, true)
|
||||
|
||||
if notDeleted := len(fs.FileTarget) - len(deletedFileIDs); notDeleted > 0 {
|
||||
return serializer.NewError(
|
||||
serializer.CodeNotFullySuccess,
|
||||
|
||||
Reference in New Issue
Block a user