1
mirror of https://github.com/rclone/rclone synced 2025-01-05 06:26:34 +01:00

acd: filter out bogus children Amazon reports sometimes

This commit is contained in:
Stefan Breunig 2016-11-06 17:07:11 +01:00 committed by Nick Craig-Wood
parent 718694d5ee
commit 2243b065e8

View File

@ -392,6 +392,17 @@ func (f *Fs) listAll(dirID string, title string, directoriesOnly bool, filesOnly
if *node.Status != statusAvailable {
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
out = append(out, node)
}