Handle errors coming in through List avoid crashes
This commit is contained in:
@@ -261,6 +261,10 @@ func dodiffRecursive(firstClnt, secondClnt client.Client, ch chan DiffMessage) {
|
||||
if fok == false {
|
||||
break
|
||||
}
|
||||
if f.Err != nil {
|
||||
ch <- DiffMessage{Error: f.Err.Trace()}
|
||||
continue
|
||||
}
|
||||
if f.Content.Type.IsDir() {
|
||||
// skip directories
|
||||
// there is no concept of directories on S3
|
||||
@@ -279,6 +283,10 @@ func dodiffRecursive(firstClnt, secondClnt client.Client, ch chan DiffMessage) {
|
||||
f, fok = <-fch
|
||||
continue
|
||||
}
|
||||
if s.Err != nil {
|
||||
ch <- DiffMessage{Error: s.Err.Trace()}
|
||||
continue
|
||||
}
|
||||
if s.Content.Type.IsDir() {
|
||||
// skip directories
|
||||
s, sok = <-sch
|
||||
|
||||
Reference in New Issue
Block a user