diff --git a/Duplicati/Library/Main/BackendManager.cs b/Duplicati/Library/Main/BackendManager.cs
index ff78a126a..6010b10ff 100644
--- a/Duplicati/Library/Main/BackendManager.cs
+++ b/Duplicati/Library/Main/BackendManager.cs
@@ -413,7 +413,7 @@ namespace Duplicati.Library.Main
{
m_encryption = DynamicLoader.EncryptionLoader.GetModule(m_options.EncryptionModule, m_options.Passphrase, m_options.RawOptions);
if (m_encryption == null)
- throw new Exception(string.Format("Encryption method not supported: ", m_options.EncryptionModule));
+ throw new Exception(string.Format("Encryption method not supported: {0}", m_options.EncryptionModule));
}
if (m_taskControl != null)
diff --git a/Duplicati/Library/Main/Controller.cs b/Duplicati/Library/Main/Controller.cs
index ee21fdc72..a112fc2a9 100644
--- a/Duplicati/Library/Main/Controller.cs
+++ b/Duplicati/Library/Main/Controller.cs
@@ -380,6 +380,16 @@ namespace Duplicati.Library.Main
m_currentTaskThread = null;
}
}
+
+ ///
+ /// Attempts to set the locale, but delays linking to the calls as they are missing in some environments
+ ///
+ [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
+ private static void DoSetLocale(System.Globalization.CultureInfo locale, System.Globalization.CultureInfo uiLocale)
+ {
+ System.Globalization.CultureInfo.DefaultThreadCurrentCulture = locale;
+ System.Globalization.CultureInfo.DefaultThreadCurrentUICulture = uiLocale;
+ }
private void OnOperationComplete(object result)
{
@@ -407,10 +417,12 @@ namespace Duplicati.Library.Main
if (m_doResetLocale)
{
- System.Globalization.CultureInfo.DefaultThreadCurrentCulture = m_resetLocale;
- System.Globalization.CultureInfo.DefaultThreadCurrentUICulture = m_resetLocaleUI;
+ // Wrap the call to avoid loading issues for the setLocale method
+ DoSetLocale(m_resetLocale, m_resetLocaleUI);
+
m_doResetLocale = false;
m_resetLocale = null;
+ m_resetLocaleUI = null;
}
if (m_resetKeys != null)
@@ -524,8 +536,9 @@ namespace Duplicati.Library.Main
m_resetLocale = System.Globalization.CultureInfo.DefaultThreadCurrentCulture;
m_resetLocaleUI = System.Globalization.CultureInfo.DefaultThreadCurrentUICulture;
m_doResetLocale = true;
- System.Globalization.CultureInfo.DefaultThreadCurrentCulture = locale;
- System.Globalization.CultureInfo.DefaultThreadCurrentUICulture = locale;
+
+ // Wrap the call to avoid loading issues for the setLocale method
+ DoSetLocale(locale, locale);
}
if (!string.IsNullOrEmpty(m_options.ThreadPriority))
diff --git a/Duplicati/Library/Main/Operation/FilelistProcessor.cs b/Duplicati/Library/Main/Operation/FilelistProcessor.cs
index 28d599879..d0ff235b8 100644
--- a/Duplicati/Library/Main/Operation/FilelistProcessor.cs
+++ b/Duplicati/Library/Main/Operation/FilelistProcessor.cs
@@ -112,7 +112,7 @@ namespace Duplicati.Library.Main.Operation
if (doubles.Count > 0)
{
- var s = string.Format("Found remote files reported as duplicates, either the backend module is broken or you need to manually remove the extra copies.\nThe following files were found multiple times: ", string.Join(", ", doubles.Keys));
+ var s = string.Format("Found remote files reported as duplicates, either the backend module is broken or you need to manually remove the extra copies.\nThe following files were found multiple times: {0}", string.Join(", ", doubles.Keys));
log.AddError(s, null);
throw new Exception(s);
}
diff --git a/Duplicati/Library/Main/Options.cs b/Duplicati/Library/Main/Options.cs
index ba652ef17..66fbe435b 100644
--- a/Duplicati/Library/Main/Options.cs
+++ b/Duplicati/Library/Main/Options.cs
@@ -690,12 +690,12 @@ namespace Duplicati.Library.Main
///
- /// Gets a value indicating whether a temporary folder has been specified
+ /// Gets a value indicating whether the user has forced the locale
///
public bool HasForcedLocale { get { return m_options.ContainsKey("force-locale"); } }
///
- /// Gets the folder where temporary files are stored
+ /// Gets the forced locale for the current user
///
public System.Globalization.CultureInfo ForcedLocale
{