diff --git a/pkg/remove/parallel.go b/pkg/remove/parallel.go index 1f9c57e67..d5dd11e8a 100644 --- a/pkg/remove/parallel.go +++ b/pkg/remove/parallel.go @@ -20,6 +20,10 @@ func RemoveItemFromDirParallel(dir fs.Item, item fs.Item) error { // remove all files in the directory in parallel for _, file := range item.GetFilesLocked() { + if !file.IsDir() { + continue + } + wait.Add(1) go func(itemPath string) { concurrencyLimit <- struct{}{}