mirror of
https://github.com/rclone/rclone
synced 2025-01-08 10:26:23 +01:00
acd: filter out bogus children Amazon reports sometimes
This commit is contained in:
parent
718694d5ee
commit
2243b065e8
@ -392,6 +392,17 @@ func (f *Fs) listAll(dirID string, title string, directoriesOnly bool, filesOnly
|
|||||||
if *node.Status != statusAvailable {
|
if *node.Status != statusAvailable {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
// Ignore bogus nodes Amazon Drive sometimes reports
|
||||||
|
hasValidParent := false
|
||||||
|
for _, parent := range node.Parents {
|
||||||
|
if parent == dirID {
|
||||||
|
hasValidParent = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if !hasValidParent {
|
||||||
|
continue
|
||||||
|
}
|
||||||
// Store the nodes up in case we have to retry the listing
|
// Store the nodes up in case we have to retry the listing
|
||||||
out = append(out, node)
|
out = append(out, node)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user