fix(dbfs): remove recursive limit for deleting files

dependabot/go_modules/github.com/ulikunitz/xz-0.5.14
Aaron Liu 2025-08-28 11:26:55 +08:00
parent a16b491f65
commit 9b40e0146f
1 changed files with 1 additions and 3 deletions

View File

@ -760,7 +760,6 @@ func (f *DBFS) deleteFiles(ctx context.Context, targets map[Navigator][]*File, f
if f.user.Edges.Group == nil { if f.user.Edges.Group == nil {
return nil, nil, fmt.Errorf("user group not loaded") return nil, nil, fmt.Errorf("user group not loaded")
} }
limit := max(f.user.Edges.Group.Settings.MaxWalkedFiles, 1)
allStaleEntities := make([]fs.Entity, 0, len(targets)) allStaleEntities := make([]fs.Entity, 0, len(targets))
storageDiff := make(inventory.StorageDiff) storageDiff := make(inventory.StorageDiff)
for n, files := range targets { for n, files := range targets {
@ -774,8 +773,7 @@ func (f *DBFS) deleteFiles(ctx context.Context, targets map[Navigator][]*File, f
// List all files to be deleted // List all files to be deleted
toBeDeletedFiles := make([]*File, 0, len(files)) toBeDeletedFiles := make([]*File, 0, len(files))
if err := n.Walk(ctx, files, limit, intsets.MaxInt, func(targets []*File, level int) error { if err := n.Walk(ctx, files, intsets.MaxInt, intsets.MaxInt, func(targets []*File, level int) error {
limit -= len(targets)
toBeDeletedFiles = append(toBeDeletedFiles, targets...) toBeDeletedFiles = append(toBeDeletedFiles, targets...)
return nil return nil
}); err != nil { }); err != nil {