mirror of
https://github.com/rclone/rclone
synced 2024-12-29 22:26:24 +01:00
mega: cleanup: add logs for -v and -vv
This commit is contained in:
parent
0e23c4542f
commit
d9cad9d10b
@ -413,13 +413,21 @@ func (f *Fs) CleanUp() (err error) {
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "CleanUp failed to list items in trash")
|
||||
}
|
||||
fs.Infof(f, "Deleting %d items from the trash", len(items))
|
||||
errors := 0
|
||||
// similar to f.deleteNode(trash) but with HardDelete as true
|
||||
for _, item := range items {
|
||||
err = f.pacer.Call(func() (bool, error) {
|
||||
err = f.srv.Delete(item, true)
|
||||
fs.Debugf(f, "Deleting trash %q", item.GetName())
|
||||
deleteErr := f.pacer.Call(func() (bool, error) {
|
||||
err := f.srv.Delete(item, true)
|
||||
return shouldRetry(err)
|
||||
})
|
||||
if deleteErr != nil {
|
||||
err = deleteErr
|
||||
errors++
|
||||
}
|
||||
}
|
||||
fs.Infof(f, "Deleted %d items from the trash with %d errors", len(items), errors)
|
||||
return err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user