aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/s3api_bucket_config.go
diff options
context:
space:
mode:
authorChris Lu <chrislusf@users.noreply.github.com>2025-12-04 10:44:31 -0800
committerGitHub <noreply@github.com>2025-12-04 10:44:31 -0800
commit66e2d9bca1397489309e0754f7c059c398934012 (patch)
tree0e326035a43aa360c894aaeec2b9bddcb3aa63ce /weed/s3api/s3api_bucket_config.go
parent49ed42b367914ac4f3e2853e698e8fc05ddac24e (diff)
parent8d110b29ddfd9b9cdb504a4380106b2b287155ca (diff)
downloadseaweedfs-origin/feature/tus-protocol.tar.xz
seaweedfs-origin/feature/tus-protocol.zip
Merge branch 'master' into feature/tus-protocolorigin/feature/tus-protocol
Diffstat (limited to 'weed/s3api/s3api_bucket_config.go')
-rw-r--r--weed/s3api/s3api_bucket_config.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/s3api/s3api_bucket_config.go b/weed/s3api/s3api_bucket_config.go
index 00449d80a..a10374339 100644
--- a/weed/s3api/s3api_bucket_config.go
+++ b/weed/s3api/s3api_bucket_config.go
@@ -519,7 +519,9 @@ func (s3a *S3ApiServer) getVersioningState(bucket string) (string, error) {
config, errCode := s3a.getBucketConfig(bucket)
if errCode != s3err.ErrNone {
if errCode == s3err.ErrNoSuchBucket {
- return "", nil
+ // Signal to callers that the bucket does not exist so they can
+ // decide whether to auto-create it (e.g., in PUT handlers).
+ return "", filer_pb.ErrNotFound
}
glog.Errorf("getVersioningState: failed to get bucket config for %s: %v", bucket, errCode)
return "", fmt.Errorf("failed to get bucket config: %v", errCode)