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:
authorTopperDEL <github_com@tparth.de>2020-06-29 09:39:25 +0300
committerTopperDEL <github_com@tparth.de>2020-06-29 09:39:25 +0300
commitb0a5e171b3e3306effeb739de3872951658f11a3 (patch)
treeeda2204035097bfadde10d211fbb1bbe29c5d22c /Duplicati/Library/Backend/Tardigrade
parent50342bf56af705c8937a69f3fc6e7a53d78824ea (diff)
fix: Refactor static constructor and storj-init-logic
Diffstat (limited to 'Duplicati/Library/Backend/Tardigrade')
-rw-r--r--Duplicati/Library/Backend/Tardigrade/TardigradeBackend.cs24
1 files changed, 11 insertions, 13 deletions
diff --git a/Duplicati/Library/Backend/Tardigrade/TardigradeBackend.cs b/Duplicati/Library/Backend/Tardigrade/TardigradeBackend.cs
index 325f75f8d..3a6b03246 100644
--- a/Duplicati/Library/Backend/Tardigrade/TardigradeBackend.cs
+++ b/Duplicati/Library/Backend/Tardigrade/TardigradeBackend.cs
@@ -54,20 +54,19 @@ namespace Duplicati.Library.Backend.Tardigrade
if (_libraryLoaded)
return;
- if(System.Environment.Is64BitProcess)
+ if (Duplicati.Library.Common.Platform.IsClientWindows) //We need to init only on Windows to distinguish between x64 and x86
{
- var res = LoadLibrary("win-x64/storj_uplink.dll");
- }
- else
- {
- var res = LoadLibrary("win-x86/storj_uplink.dll");
+ if (System.Environment.Is64BitProcess)
+ {
+ var res = LoadLibrary("win-x64/storj_uplink.dll");
+ }
+ else
+ {
+ var res = LoadLibrary("win-x86/storj_uplink.dll");
+ }
}
- _libraryLoaded = true;
- }
-
- static Tardigrade()
- {
Access.SetTempDirectory(Library.Utility.TempFolder.SystemTempPath);
+ _libraryLoaded = true;
}
// ReSharper disable once UnusedMember.Global
@@ -80,8 +79,7 @@ namespace Duplicati.Library.Backend.Tardigrade
// This constructor is needed by the BackendLoader.
public Tardigrade(string url, Dictionary<string, string> options)
{
- if (Duplicati.Library.Common.Platform.IsClientWindows)
- InitStorjLibrary(); //We need to init only on Windows to distinguish between x64 and x86
+ InitStorjLibrary();
var auth_method = options[TARDIGRADE_AUTH_METHOD];
if (auth_method == "Access grant")