Skip to content

Commit

Permalink
Remove error statement in mc mirror (#2500)
Browse files Browse the repository at this point in the history
mc mirror complains about extra file in destination,
but this is not an error so removed the error message.

Fixes: #2470
  • Loading branch information
sinhaashish authored and nitisht committed Aug 2, 2018
1 parent 480bc8a commit 9998e07
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
2 changes: 1 addition & 1 deletion cmd/mirror-main.go
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ func (mj *mirrorJob) mirror(ctx context.Context, cancelMirror context.CancelFunc
PathInsufficientPermission, ObjectOnGlacier:
errorIf(err, "Unable to perform a mirror action.")
continue
case deleteNotAllowedErr, overwriteNotAllowedErr:
case overwriteNotAllowedErr:
errorIf(err, "Unable to perform a mirror action.")
continue
}
Expand Down
4 changes: 0 additions & 4 deletions cmd/mirror-url.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,6 @@ func deltaSourceTarget(sourceURL, targetURL string, isFake, isOverwrite, isRemov
}
case differInSecond:
if !isRemove && !isFake {
// Object removal not allowed if --remove is not set.
URLsCh <- URLs{
Error: errDeleteNotAllowed(diffMsg.SecondURL),
}
continue
}
URLsCh <- URLs{
Expand Down
7 changes: 0 additions & 7 deletions cmd/typed-errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,6 @@ var errOverWriteNotAllowed = func(URL string) *probe.Error {
return probe.NewError(overwriteNotAllowedErr(errors.New(msg)))
}

type deleteNotAllowedErr error

var errDeleteNotAllowed = func(URL string) *probe.Error {
msg := "Delete not allowed for `" + URL + "`. Use `--remove` to override this behavior."
return probe.NewError(deleteNotAllowedErr(errors.New(msg)))
}

type sourceIsDirErr error

var errSourceIsDir = func(URL string) *probe.Error {
Expand Down

0 comments on commit 9998e07

Please sign in to comment.