Skip to content

Commit

Permalink
fix duplicated rename when enabling ms
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Leung <[email protected]>
  • Loading branch information
rleungx committed Apr 26, 2024
1 parent 2c38be7 commit 7bf4a35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/repository/v1_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ func (r *V1Repository) DownloadComponent(item *v1manifest.VersionItem, target st
}

// the downloaded file is named by item.URL, which maybe differ to target name
if downloaded := path.Join(targetDir, item.URL); downloaded != target {
if downloaded := path.Join(targetDir, item.URL); downloaded != target && utils.IsExist(downloaded) {
err := os.Rename(downloaded, target)
if err != nil {
return err
Expand Down

0 comments on commit 7bf4a35

Please sign in to comment.