1
0
mirror of https://github.com/minio/mc.git synced 2025-11-13 12:22:45 +03:00

Full cleanup of s3 client for mc

This commit is contained in:
Harshavardhana
2015-05-01 15:52:08 -07:00
parent 28315e7492
commit 78a78c072a
23 changed files with 1008 additions and 875 deletions

6
cp.go
View File

@@ -85,11 +85,11 @@ func doCopySingleSourceRecursive(methods clientMethods, sourceURL, targetURL str
if err != nil {
return iodine.New(err, nil)
}
for itemCh := range sourceClnt.ListRecursive() {
if itemCh.Err != nil {
for contentCh := range sourceClnt.ListRecursive() {
if contentCh.Err != nil {
continue
}
newSourceURL, newTargetURL := getNewURLRecursive(sourceURL, targetURL, itemCh.Item.Name)
newSourceURL, newTargetURL := getNewURLRecursive(sourceURL, targetURL, contentCh.Content.Name)
if err := doCopySingleSource(methods, newSourceURL, newTargetURL, sourceConfig, targetConfig); err != nil {
// verify for directory related errors, if "open" failed on directories ignore those errors
switch e := iodine.ToError(err).(type) {