Fix SystemIOWindows.PathGetFullPath per review comments.
Add unit tests for SystemIOWindows.PathGetFullPath and SystemIOWindows.PrefixWithUNC. Also, fix a bug in the SystemIOWindows.PrefixWithUNC change that was exposed by these new unit tests.
In BackendToolTests, remove unused [Setup] and [TearDown] methods.
The handling of relative paths in SystemIOWindows was broken by changes for #4256.
Change SystemIOWindows.PrefixWithUNC to only prefix paths with `\\?\` when they can be prefixed; i.e., only prefix paths that are fully qualified and that don't contain relative path components like `.` or `..`. This way, relative paths passed to SystemIOWindows methods work correctly again. Also support network paths specified using forward slashes; e.g., `//example.com/share/foo.txt`.
Simplify SystemIOWindows.GetFullPath since Path.GetFullPath will honor `\\?\` prefixes and can replace forward slashes with backslashes, etc.
Copy and adapt source for Path.IsPathFullyQualified from https://github.com/dotnet/runtime, which is MIT licensed.
Add unit test for Duplicati.CommandLine.BackendTool to validate the fix.
This fixes#4632.
Since the repair introduces artifical filelists, there is sometimes a race in CI where the purge is faster than a second causing the time sequences to not line up during testing.
There are occasionally times where the difference is greater than 500ms.
1) Failed : Duplicati.UnitTest.BorderTests.Run100k
Restore, creation time mismatch for /Users/runner/duplicati_testdata/backup-data/c-m2 and /Users/runner/duplicati_testdata/restored/c-m2
Expected: 2021-02-08 18:39:04.9202665 +/- 00:00:00.5000000
But was: 2021-02-08 18:39:05.572262
at Duplicati.UnitTest.TestUtils.AssertFilesAreEqual (System.String
expectedFile, System.String actualFile, System.Boolean verifymetadata,
System.String contextMessage) [0x0016f] in
/Users/runner/work/duplicati/duplicati/Duplicati/UnitTest/TestUtils.cs:256
There are occasionally times where the difference is greater than 200ms.
1) Failed : Duplicati.UnitTest.BorderTests.Run100k
Restore, creation time mismatch for /Users/runner/duplicati_testdata/backup-data/b-p500 and /Users/runner/duplicati_testdata/restored/b-p500
Expected: 2021-02-08 00:34:08.0221856 +/- 00:00:00.2500000
But was: 2021-02-08 00:34:08.296859
at Duplicati.UnitTest.TestUtils.AssertFilesAreEqual (System.String
expectedFile, System.String actualFile, System.Boolean verifymetadata,
System.String contextMessage) [0x0016f] in
/Users/runner/work/duplicati/duplicati/Duplicati/UnitTest/TestUtils.cs:256
This is an attempt to avoid errors like "System.Exception : The previous
backup has time 9/27/2020 5:25:56 PM, but this backup has time 9/27/2020
5:25:55 PM. Something is wrong with the clock." We are seeing these
errors often recently in AppVeyor.