Add more checks for canceled contexts
This commit is contained in:
parent
8d5e188218
commit
ae1cb889dd
17 changed files with 87 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue