qingstor: fix error propagation in CleanUp

Before this change errors cleaning multiple buckets were passing silently
This commit is contained in:
Nick Craig-Wood 2021-01-21 17:18:46 +00:00
parent 38e70f1797
commit d7cd35e2ca

View File

@ -927,7 +927,7 @@ func (f *Fs) CleanUp(ctx context.Context) (err error) {
} }
for _, entry := range entries { for _, entry := range entries {
cleanErr := f.cleanUpBucket(ctx, f.opt.Enc.FromStandardName(entry.Remote())) cleanErr := f.cleanUpBucket(ctx, f.opt.Enc.FromStandardName(entry.Remote()))
if err != nil { if cleanErr != nil {
fs.Errorf(f, "Failed to cleanup bucket: %q", cleanErr) fs.Errorf(f, "Failed to cleanup bucket: %q", cleanErr)
err = cleanErr err = cleanErr
} }