fix: cleanup old directory handling code (#10633)

we don't need them anymore, remove legacy code.
This commit is contained in:
Harshavardhana
2020-10-06 12:03:57 -07:00
committed by GitHub
parent 57f0176759
commit 18063bf25c
6 changed files with 58 additions and 148 deletions

View File

@@ -173,7 +173,7 @@ func checkObjectArgs(ctx context.Context, bucket, object string, obj ObjectLayer
}
// Checks for PutObject arguments validity, also validates if bucket exists.
func checkPutObjectArgs(ctx context.Context, bucket, object string, obj getBucketInfoI, size int64) error {
func checkPutObjectArgs(ctx context.Context, bucket, object string, obj getBucketInfoI) error {
// Verify if bucket exists before validating object name.
// This is done on purpose since the order of errors is
// important here bucket does not exist error should
@@ -187,7 +187,6 @@ func checkPutObjectArgs(ctx context.Context, bucket, object string, obj getBucke
return err
}
if len(object) == 0 ||
(HasSuffix(object, SlashSeparator) && size != 0) ||
!IsValidObjectPrefix(object) {
return ObjectNameInvalid{
Bucket: bucket,