diff --git a/Duplicati/Library/Main/Interface.cs b/Duplicati/Library/Main/Interface.cs index 43566ebfe..d4a04740f 100644 --- a/Duplicati/Library/Main/Interface.cs +++ b/Duplicati/Library/Main/Interface.cs @@ -2075,7 +2075,7 @@ namespace Duplicati.Library.Main stats.VerboseRetryErrors = m_options.VerboseRetryErrors; } - if (!string.IsNullOrEmpty(m_options.TempDir)) + if (m_options.HasTempDir) Utility.TempFolder.SystemTempPath = m_options.TempDir; if (!string.IsNullOrEmpty(m_options.ThreadPriority)) diff --git a/Duplicati/Library/Main/Options.cs b/Duplicati/Library/Main/Options.cs index 003ab6880..92fda66c3 100644 --- a/Duplicati/Library/Main/Options.cs +++ b/Duplicati/Library/Main/Options.cs @@ -651,6 +651,11 @@ namespace Duplicati.Library.Main /// public bool Force { get { return GetBool("force"); } } + /// + /// Gets a value indicating whether a temporary folder has been specified + /// + public bool HasTempDir { get { return m_options.ContainsKey("tempdir") && !string.IsNullOrEmpty(m_options["tempdir"]); } } + /// /// Gets the folder where temporary files are stored ///