Skip to content

Commit

Permalink
Remove non-empty directories recursively
Browse files Browse the repository at this point in the history
  • Loading branch information
IljaN committed Feb 2, 2021
1 parent 6e5eae2 commit d820053
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/storage/fs/ocis/recycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func (fs *ocisfs) PurgeRecycleItem(ctx context.Context, key string) (err error)
return errtypes.PermissionDenied(key)
}

if err = os.Remove(deletedNodePath); err != nil {
if err = os.RemoveAll(deletedNodePath); err != nil {
log.Error().Err(err).Str("deletedNodePath", deletedNodePath).Msg("error deleting trash node")
return
}
Expand Down

0 comments on commit d820053

Please sign in to comment.