|
|
|
@@ -219,11 +219,11 @@ func GetOneLevelAllObjectUnderDirMinio(bucket string, prefixRootPath string, rel |
|
|
|
|
|
|
|
func MinioPathCopy(bucketName string, srcPath string, destPath string) (int64, error) { |
|
|
|
_, core, err := getClients() |
|
|
|
var count int64 |
|
|
|
count = 0 |
|
|
|
var fileTotalSize int64 |
|
|
|
fileTotalSize = 0 |
|
|
|
if err != nil { |
|
|
|
log.Error("getClients failed:", err.Error()) |
|
|
|
return count, err |
|
|
|
return fileTotalSize, err |
|
|
|
} |
|
|
|
delimiter := "" |
|
|
|
marker := "" |
|
|
|
@@ -235,7 +235,7 @@ func MinioPathCopy(bucketName string, srcPath string, destPath string) (int64, e |
|
|
|
destObjectName := destPath + srcObjectName[len(srcPath):] |
|
|
|
log.Info("srcObjectName=" + srcObjectName + " destObjectName=" + destObjectName) |
|
|
|
core.CopyObject(bucketName, srcObjectName, bucketName, destObjectName, val.UserMetadata) |
|
|
|
count++ |
|
|
|
fileTotalSize += val.Size |
|
|
|
} |
|
|
|
if output.IsTruncated { |
|
|
|
marker = output.NextMarker |
|
|
|
@@ -247,7 +247,7 @@ func MinioPathCopy(bucketName string, srcPath string, destPath string) (int64, e |
|
|
|
return 0, err |
|
|
|
} |
|
|
|
} |
|
|
|
return count, nil |
|
|
|
return fileTotalSize, nil |
|
|
|
} |
|
|
|
|
|
|
|
func NewMultiPartUpload(uuid string) (string, error) { |
|
|
|
|