Skip to content

Commit

Permalink
mirror/diff: Ignore errors during objectDifference. (#2200)
Browse files Browse the repository at this point in the history
Files which are broken in symlink, not accessible
and unsupported should be ignored. We should proceed
to next object.

Fixes #2199
  • Loading branch information
harshavardhana authored and deekoder committed Jul 6, 2017
1 parent 1b9bead commit 8391a69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cmd/diff-main.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ func doDiffMain(firstURL, secondURL string) error {
for diffMsg := range objectDifference(firstClient, secondClient, firstURL, secondURL) {
if diffMsg.Error != nil {
errorIf(diffMsg.Error, "Unable to calculate objects difference.")
break
// Ignore error and proceed to next object.
continue
}
printMsg(diffMsg)
}
Expand Down
3 changes: 2 additions & 1 deletion cmd/mirror-url.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ func deltaSourceTarget(sourceURL string, targetURL string, isForce bool, isFake
for diffMsg := range objectDifference(sourceClnt, targetClnt, sourceURL, targetURL) {
if diffMsg.Error != nil {
errorIf(diffMsg.Error, "Unable to mirror objects.")
break
// Ignore error and proceed to next object.
continue
}
switch diffMsg.Diff {
case differInNone:
Expand Down

0 comments on commit 8391a69

Please sign in to comment.