@@ -18,6 +18,8 @@ package cmd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/minio/minio-go/v6/pkg/s3utils"
|
||||
@@ -50,6 +52,10 @@ func checkBucketAndObjectNames(ctx context.Context, bucket, object string) error
|
||||
logger.LogIf(ctx, ObjectNameInvalid{Bucket: bucket, Object: object})
|
||||
return ObjectNameInvalid{Bucket: bucket, Object: object}
|
||||
}
|
||||
if runtime.GOOS == globalWindowsOSName && strings.Contains(object, "\\") {
|
||||
// Objects cannot be contain \ in Windows and is listed as `Characters to Avoid`.
|
||||
return ObjectNameInvalid{Bucket: bucket, Object: object}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user