Support creating directories on erasure coded backend (#5443)
This PR continues from #5049 where we started supporting directories for erasure coded backend
This commit is contained in:
committed by
Nitish Tiwari
parent
45c35b3544
commit
3ea28e9771
@@ -38,11 +38,10 @@ func checkBucketAndObjectNames(bucket, object string) error {
|
||||
return errors.Trace(BucketNameInvalid{Bucket: bucket})
|
||||
}
|
||||
// Verify if object is valid.
|
||||
if !IsValidObjectName(object) {
|
||||
// Objects with "/" are invalid, verify to return a different error.
|
||||
if hasSuffix(object, slashSeparator) || hasPrefix(object, slashSeparator) {
|
||||
return errors.Trace(ObjectNotFound{Bucket: bucket, Object: object})
|
||||
}
|
||||
if len(object) == 0 {
|
||||
return errors.Trace(ObjectNameInvalid{Bucket: bucket, Object: object})
|
||||
}
|
||||
if !IsValidObjectPrefix(object) {
|
||||
return errors.Trace(ObjectNameInvalid{Bucket: bucket, Object: object})
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user