mirror of
https://github.com/pgsty/minio.git
synced 2026-10-08 10:45:58 +03:00
fs/xl: Combine input checks into re-usable functions. (#3383)
Repeated code around both object layers are moved and combined into simple re-usable functions.
This commit is contained in:
@@ -33,7 +33,7 @@ import (
|
||||
// Enforces bucket policies for a bucket for a given tatusaction.
|
||||
func enforceBucketPolicy(bucket string, action string, reqURL *url.URL) (s3Error APIErrorCode) {
|
||||
// Verify if bucket actually exists
|
||||
if err := isBucketExist(bucket, newObjectLayerFn()); err != nil {
|
||||
if err := checkBucketExist(bucket, newObjectLayerFn()); err != nil {
|
||||
err = errorCause(err)
|
||||
switch err.(type) {
|
||||
case BucketNameInvalid:
|
||||
|
||||
Reference in New Issue
Block a user