Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Duplicati/Library/Backend/S3/S3Backend.cs10
1 files changed, 4 insertions, 6 deletions
diff --git a/Duplicati/Library/Backend/S3/S3Backend.cs b/Duplicati/Library/Backend/S3/S3Backend.cs
index 25eda24ef..90e2bdecd 100644
--- a/Duplicati/Library/Backend/S3/S3Backend.cs
+++ b/Duplicati/Library/Backend/S3/S3Backend.cs
@@ -224,12 +224,10 @@ namespace Duplicati.Library.Backend
//Change in S3, now requires that you use location specific endpoint
if (!string.IsNullOrEmpty(locationConstraint))
- foreach (var kvp in DEFAULT_S3_LOCATION_BASED_HOSTS)
- if (kvp.Key.Equals(locationConstraint, StringComparison.OrdinalIgnoreCase))
- {
- s3host = kvp.Value;
- break;
- }
+ {
+ if (DEFAULT_S3_LOCATION_BASED_HOSTS.TryGetValue(locationConstraint, out var s3hostmatch))
+ s3host = s3hostmatch;
+ }
}
//Fallback to previous formats