onedrive: report any list errors during cleanup

This commit is contained in:
albertony
2023-03-26 14:28:15 +02:00
parent 432eb74814
commit c1586a9866
2 changed files with 4 additions and 14 deletions
+4
View File
@@ -1724,6 +1724,10 @@ func (f *Fs) CleanUp(ctx context.Context) error {
token := make(chan struct{}, f.ci.Checkers)
var wg sync.WaitGroup
err := walk.Walk(ctx, f, "", true, -1, func(path string, entries fs.DirEntries, err error) error {
if err != nil {
fs.Errorf(f, "Failed to list %q: %v", path, err)
return nil
}
err = entries.ForObjectError(func(obj fs.Object) error {
o, ok := obj.(*Object)
if !ok {