diff options
| author | chrislu <chris.lu@gmail.com> | 2025-07-18 16:25:45 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2025-07-18 16:25:45 -0700 |
| commit | a0ab227e078987bf81551ff80586324fba6c7083 (patch) | |
| tree | 6d1f632ab710de4e0f3c94afd00158b90da5ddec /weed/s3api/s3api_bucket_config.go | |
| parent | 2ad4a924be2a90a517c56eca6d87e94fed97c3fd (diff) | |
| download | seaweedfs-a0ab227e078987bf81551ff80586324fba6c7083.tar.xz seaweedfs-a0ab227e078987bf81551ff80586324fba6c7083.zip | |
fixes
Diffstat (limited to 'weed/s3api/s3api_bucket_config.go')
| -rw-r--r-- | weed/s3api/s3api_bucket_config.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/s3api/s3api_bucket_config.go b/weed/s3api/s3api_bucket_config.go index 5bfae7666..41e750e5c 100644 --- a/weed/s3api/s3api_bucket_config.go +++ b/weed/s3api/s3api_bucket_config.go @@ -214,7 +214,9 @@ func (s3a *S3ApiServer) isVersioningEnabled(bucket string) (bool, error) { return false, fmt.Errorf("failed to get bucket config: %v", errCode) } - return config.Versioning == "Enabled", nil + // Versioning is enabled if explicitly set to "Enabled" OR if object lock is enabled + // (since object lock requires versioning to be enabled) + return config.Versioning == s3_constants.VersioningEnabled || config.ObjectLockConfig != nil, nil } // getBucketVersioningStatus returns the versioning status for a bucket |
