Skip to content

Commit

Permalink
fix: resolve rename oss file not right.
Browse files Browse the repository at this point in the history
  • Loading branch information
xufeixiang committed Jun 27, 2024
1 parent 707e5c5 commit 932cd70
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/common/models/storage_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ func (s *StorageClientCache) RenameObject(ctx context.Context, storage *Storage,
basename := strings.TrimPrefix(info.Key, mutation.Src)
if isDir && basename != "" {
destObject = utils.NormalizePath(destObject, basename)
} else if srcObject == "" {
srcObject = mutation.Src
}
srcOptions := minio.CopySrcOptions{Bucket: bucketName, Object: srcObject}
destOptions := minio.CopyDestOptions{Bucket: bucketName, Object: destObject}
Expand Down

0 comments on commit 932cd70

Please sign in to comment.