mirror of
https://github.com/minio/minio.git
synced 2025-11-26 04:26:12 -05:00
fs: Fail createObject with appropriate message.
Fail createObject() if a file already exists and one attempts to create a prefix/directory by same name. Send an approriate error back to the client as 409 Conflict.
This commit is contained in:
@@ -102,6 +102,16 @@ func (e ObjectNotFound) Error() string {
|
||||
return "Object not found: " + e.Bucket + "#" + e.Object
|
||||
}
|
||||
|
||||
// ObjectExistsAsPrefix object already exists with a requested prefix.
|
||||
type ObjectExistsAsPrefix struct {
|
||||
Bucket string
|
||||
Prefix string
|
||||
}
|
||||
|
||||
func (e ObjectExistsAsPrefix) Error() string {
|
||||
return "Object exists on : " + e.Bucket + " as prefix " + e.Prefix
|
||||
}
|
||||
|
||||
// ObjectCorrupted object found to be corrupted
|
||||
type ObjectCorrupted struct {
|
||||
Object string
|
||||
|
||||
Reference in New Issue
Block a user