mirror of
https://github.com/rclone/rclone.git
synced 2024-11-23 23:23:12 +08:00
acd: Fix deadlock in directory traversal code
This commit is contained in:
parent
c3a0c0c451
commit
c47b4f828f
|
@ -420,11 +420,14 @@ func (f *Fs) listDirNonRecursive(dirID string, path string, out fs.ObjectsChan)
|
|||
errs <- err
|
||||
}
|
||||
// FIXME stop traversal on error?
|
||||
// Now we have traversed this directory, send these jobs off for traversal
|
||||
for _, job := range jobs {
|
||||
traversing.Add(1)
|
||||
in <- job
|
||||
}
|
||||
traversing.Add(len(jobs))
|
||||
go func() {
|
||||
// Now we have traversed this directory, send these jobs off for traversal in
|
||||
// the background
|
||||
for _, job := range jobs {
|
||||
in <- job
|
||||
}
|
||||
}()
|
||||
traversing.Done()
|
||||
}
|
||||
}()
|
||||
|
|
Loading…
Reference in New Issue
Block a user