This was causing a strange issue when testing the situation where write
privileges were removed from the local destination directory. Instead
of catching the AccessViolationException and returning the expected exit
code of 100, the process would exit with Aborted (core dumped).
This concerns #4533.
This adds a method to get a default instance of AmazonS3Config. This
accomplishes two key things:
1. Previously, the documentation for the default buffer size (8192) was
inconsistent with the actual default value (65536). This was due to
differences in the property values betwen the instance used to
generate the documentation, and that used in the actual backend
client.
2. Disables the use of Amazon Resource Names (ARN). This does not seem
critical to our application. Moreover, if the UseArnRegion property
is not set, accessing it triggers an expensive operation (~30
seconds) to get the region endpoint. This causes the loading of the
backend modules to take a long time and run afoul of HTTP request
timeouts, causing the application to think that no backends are
available.
The previous version of the AWSSDK.S3 library that we used did not
have this property, so this was not an issue until we started
migrating away from .NET Framework.
This fixes#4543.
This fixes some additional issues in the experimental/net5-split branch:
* Replace call to Thread.Abort.
* Fix retrieval of embedded resource.
* Replace DNS client (DnsLite doesn't work on Mac or Linux with .NET 5).
* Avoid opening terminal when running TrayIcon project on Windows.
Without await, the using statement can dispose the Stream before the
call to PutAsync completes, resulting in an ObjectDisposedException.
This fixes#4556.
Before performing test write, reset stream Position to 0, otherwise test performs zero-byte write.
When performing test read, verify that file was written correctly.
Previously, we would have inconsistent paths to the executables (net5
vs. net5.0). For example,
Executables/net5/Duplicati.CommandLine.BackendTester/bin/Debug/net5.0
Executables/net5/Duplicati.CommandLine/bin/Debug/net5
With these changes, the path to the Duplicati.CommandLine executables
becomes
Executables/net5/Duplicati.CommandLine/bin/Debug/net5.0
Previously, we would catch any Exception thrown by VerifyRemoteList and
perform an auto-cleanup (if specified in the options). However, we
should only perform the auto-cleanup if VerifyRemoteList detected an
issue with the uploaded files. Otherwise, an unrelated exception can
cause the database repair to be performed unnecessarily. In the case of
a connection issue, this can leave the database in a corrupted state.
This fixes#4516.
.NET 5 moves the responsibility to the operating system, and since
SSH.NET currently relies on the ECDsaCng class, we will simply interpret
all exceptions to mean lack of ECDSA support.
It's possible that our test will no longer be valid (e.g., due to
changes in SSH.NET), so we don't want the backend to fail if our test
is no longer valid.