mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 14:51:48 +08:00
onedrive: report any list errors during cleanup
This commit is contained in:
parent
432eb74814
commit
c1586a9866
|
@ -44,20 +44,6 @@ issues:
|
||||||
- staticcheck
|
- staticcheck
|
||||||
text: 'SA6002: argument should be pointer-like to avoid allocations'
|
text: 'SA6002: argument should be pointer-like to avoid allocations'
|
||||||
|
|
||||||
# TODO: Investigate if this is a real issue. If not, i.e. it is a false
|
|
||||||
# positive, consider instead excluding this check using a code comment!
|
|
||||||
- path: ^backend[\\/]onedrive[\\/]onedrive\.go$
|
|
||||||
linters:
|
|
||||||
- staticcheck
|
|
||||||
text: 'SA4009: argument err is overwritten before first use'
|
|
||||||
|
|
||||||
# TODO: Investigate if this is a real issue. If not, i.e. it is a false
|
|
||||||
# positive, consider instead excluding this check using a code comment!
|
|
||||||
- path: ^backend[\\/]onedrive[\\/]onedrive\.go$
|
|
||||||
linters:
|
|
||||||
- staticcheck
|
|
||||||
text: 'SA4009\(related information\): assignment to err'
|
|
||||||
|
|
||||||
# TODO: Investigate if this is a real issue. If not, i.e. it is a false
|
# TODO: Investigate if this is a real issue. If not, i.e. it is a false
|
||||||
# positive, consider instead excluding this check using a code comment!
|
# positive, consider instead excluding this check using a code comment!
|
||||||
- path: ^fs[\\/]pacer\.go$
|
- path: ^fs[\\/]pacer\.go$
|
||||||
|
|
|
@ -1724,6 +1724,10 @@ func (f *Fs) CleanUp(ctx context.Context) error {
|
||||||
token := make(chan struct{}, f.ci.Checkers)
|
token := make(chan struct{}, f.ci.Checkers)
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
err := walk.Walk(ctx, f, "", true, -1, func(path string, entries fs.DirEntries, err error) error {
|
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 {
|
err = entries.ForObjectError(func(obj fs.Object) error {
|
||||||
o, ok := obj.(*Object)
|
o, ok := obj.(*Object)
|
||||||
if !ok {
|
if !ok {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user