mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
fix: return error on conditional write for non existing object (#21550)
This commit is contained in:
@@ -1277,6 +1277,11 @@ func (er erasureObjects) putObject(ctx context.Context, bucket string, object st
|
||||
if err != nil && !isErrVersionNotFound(err) && !isErrObjectNotFound(err) && !isErrReadQuorum(err) {
|
||||
return objInfo, err
|
||||
}
|
||||
|
||||
// if object doesn't exist and not a replication request return error for conditional requests
|
||||
if err != nil && !opts.ReplicationRequest {
|
||||
return objInfo, err
|
||||
}
|
||||
}
|
||||
|
||||
// Validate input data size and it can never be less than -1.
|
||||
|
||||
Reference in New Issue
Block a user