diff --git a/src/duplicacy_s3storage.go b/src/duplicacy_s3storage.go index e29af95..5f7d3e8 100644 --- a/src/duplicacy_s3storage.go +++ b/src/duplicacy_s3storage.go @@ -237,8 +237,6 @@ func (storage *S3Storage) UploadFile(threadIndex int, filePath string, content [ LOG_INFO("S3_RETRY", "Retrying on %s: %v", reflect.TypeOf(err), err) attempts += 1 } - - return err } // If a local snapshot cache is needed for the storage to avoid downloading/uploading chunks too often when diff --git a/src/duplicacy_storage_test.go b/src/duplicacy_storage_test.go index 01c333a..88a037f 100644 --- a/src/duplicacy_storage_test.go +++ b/src/duplicacy_storage_test.go @@ -80,12 +80,12 @@ func loadStorage(localStoragePath string, threads int) (Storage, error) { return storage, err } else if testStorageName == "s3" { storage, err := CreateS3Storage(config["region"], config["endpoint"], config["bucket"], config["directory"], config["access_key"], config["secret_key"], threads, true, false) - return storage, err storage.SetDefaultNestingLevels([]int{2, 3}, 2) + return storage, err } else if testStorageName == "wasabi" { storage, err := CreateWasabiStorage(config["region"], config["endpoint"], config["bucket"], config["directory"], config["access_key"], config["secret_key"], threads) - return storage, err storage.SetDefaultNestingLevels([]int{2, 3}, 2) + return storage, err } else if testStorageName == "s3c" { storage, err := CreateS3CStorage(config["region"], config["endpoint"], config["bucket"], config["directory"], config["access_key"], config["secret_key"], threads) storage.SetDefaultNestingLevels([]int{2, 3}, 2) @@ -153,10 +153,7 @@ func loadStorage(localStoragePath string, threads int) (Storage, error) { } storage.SetDefaultNestingLevels([]int{2, 3}, 2) return storage, err - } else { - return nil, fmt.Errorf("Invalid storage named: %s", testStorageName) } - return nil, fmt.Errorf("Invalid storage named: %s", testStorageName) }