Added exit-on-error flag. Its value is false by default.
Added shouldStopSync function. It determines whether a sync process should be stopped or not. It does not ignore the errors AccessDenied and NoSuchBucket regardless of the value of exit-on-error flag.
sync command stops if an error is received when listing objects from source or destination when the exit-on-error flag is true. But it always ignores the ErrNoObjectFound error.
Resolves #564
Changes are made:
exit-on-error
flag. Its value isfalse
by default.shouldStopSync
function. It determines whether a sync process should be stopped or not. It does not ignore the errorsAccessDenied
andNoSuchBucket
regardless of the value ofexit-on-error
flag.sync
command stops if an error is received when listing objects from source or destination when theexit-on-error
flag istrue
. But it always ignores theErrNoObjectFound
error.