Merge pull request #4250 from jpschewe/s3-backend-error-handling

Remove try/catch that is hiding errors in S3 backends.
This commit is contained in:
warwickmm
2020-07-08 17:34:50 -07:00
committed by GitHub
+1 -20
View File
@@ -353,26 +353,7 @@ namespace Duplicati.Library.Backend
public void Get(string remotename, System.IO.Stream output)
{
try
{
Connection.GetFileStream(m_bucket, GetFullKey(remotename), output);
}
catch
{
//This is a fix for the S3 backend prior to beta 3, where the filenames had a slash prefixed
try
{
if (!remotename.StartsWith("/", StringComparison.Ordinal))
Connection.GetFileStream(m_bucket, GetFullKey("/" + remotename), output);
return;
}
catch
{
}
//Throw original error
throw;
}
Connection.GetFileStream(m_bucket, GetFullKey(remotename), output);
}
public void Delete(string remotename)