aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2025-12-10 12:50:48 -0800
committerchrislu <chris.lu@gmail.com>2025-12-10 12:50:48 -0800
commit2188d1ccc5a32f884d876ef9a997dae3a727375e (patch)
tree6f13b1becf2ce94286e9ff5888ad600e9a0d20da
parent4c36cd04d6e7a16d468729bd0299c4a947c4b103 (diff)
downloadseaweedfs-2188d1ccc5a32f884d876ef9a997dae3a727375e.tar.xz
seaweedfs-2188d1ccc5a32f884d876ef9a997dae3a727375e.zip
fix object name
-rw-r--r--weed/s3api/s3api_object_versioning.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/weed/s3api/s3api_object_versioning.go b/weed/s3api/s3api_object_versioning.go
index a2a7c3a3d..0174c2a4b 100644
--- a/weed/s3api/s3api_object_versioning.go
+++ b/weed/s3api/s3api_object_versioning.go
@@ -424,8 +424,9 @@ func (s3a *S3ApiServer) findVersionsRecursively(currentPath, relativePath string
}
// Check if a .versions directory exists for this object
- versionsObjectPath := normalizedObjectKey + s3_constants.VersionsFolder
- _, versionsErr := s3a.getEntry(currentPath, versionsObjectPath)
+ // Use entry.Name (relative to currentPath) to avoid duplicating subdirectory segments
+ versionsEntryName := entry.Name + s3_constants.VersionsFolder
+ _, versionsErr := s3a.getEntry(currentPath, versionsEntryName)
if versionsErr == nil {
// .versions directory exists
glog.V(4).Infof("Found .versions directory for regular file %s, hasVersionMeta=%v", normalizedObjectKey, hasVersionMeta)