[Agent][Deploy] - 修改ImageSync模块 大量修改

This commit is contained in:
zeaslity
2024-08-21 13:52:49 +08:00
parent e26b7a7a00
commit ed6754e3d5
11 changed files with 346 additions and 219 deletions

View File

@@ -186,6 +186,8 @@ func (op *MinioOperator) UploadFile(bucketNameWithSuffix, filePath, fileName str
filePath += string(separator)
}
fileName = strings.TrimPrefix(fileName, "/")
bucketNameWithSuffix = strings.TrimPrefix(bucketNameWithSuffix, "/")
oldBucketName := bucketNameWithSuffix
realFileName := fileName
@@ -205,6 +207,6 @@ func (op *MinioOperator) UploadFile(bucketNameWithSuffix, filePath, fileName str
return false
}
log.InfoF("[UploadFile] - uploaded %s of size %d", filePath+fileName, n)
log.InfoF("[UploadFile] - uploaded [%s] of size %d", filePath+realFileName, n)
return true
}