mirror of
https://github.com/restic/restic.git
synced 2025-12-11 18:47:50 +00:00
Add more checks for canceled contexts
This commit is contained in:
@@ -578,6 +578,10 @@ func (r *SFTP) deleteRecursive(ctx context.Context, name string) error {
|
||||
}
|
||||
|
||||
for _, fi := range entries {
|
||||
if ctx.Err() != nil {
|
||||
return ctx.Err()
|
||||
}
|
||||
|
||||
itemName := r.Join(name, fi.Name())
|
||||
if fi.IsDir() {
|
||||
err := r.deleteRecursive(ctx, itemName)
|
||||
|
||||
Reference in New Issue
Block a user