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:
authorKenneth Skovhede <kenneth@hexad.dk>2020-12-19 16:40:01 +0300
committerGitHub <noreply@github.com>2020-12-19 16:40:01 +0300
commit1a2e69fd9f0515ecfab392cc369aa902927f61d8 (patch)
tree7ab07e59bf8b72185712bb609ac540fb17714a2b /Duplicati/Library
parent5af8e1c38b861586d89798278a1ceb4b73074f65 (diff)
parent6570cd954c50b8957b19322e8815494d68dc75e7 (diff)
Merge pull request #4357 from warwickmm/fix_run_script_before_remoteurl
Fix issue where remote URL defined using run-script-before was ignored
Diffstat (limited to 'Duplicati/Library')
-rw-r--r--Duplicati/Library/Modules/Builtin/RunScript.cs15
1 files changed, 8 insertions, 7 deletions
diff --git a/Duplicati/Library/Modules/Builtin/RunScript.cs b/Duplicati/Library/Modules/Builtin/RunScript.cs
index be70ec078..e8188df22 100644
--- a/Duplicati/Library/Modules/Builtin/RunScript.cs
+++ b/Duplicati/Library/Modules/Builtin/RunScript.cs
@@ -153,16 +153,17 @@ namespace Duplicati.Library.Modules.Builtin
public void OnStart(string operationname, ref string remoteurl, ref string[] localpath)
{
- m_operationName = operationname;
- m_remoteurl = remoteurl;
- m_localpath = localpath;
-
-
if (!string.IsNullOrEmpty(m_requiredScript))
- Execute(m_requiredScript, "BEFORE", m_operationName, ref m_remoteurl, ref m_localpath, m_timeout, true, m_options, null, null);
+ Execute(m_requiredScript, "BEFORE", operationname, ref remoteurl, ref localpath, m_timeout, true, m_options, null, null);
if (!string.IsNullOrEmpty(m_startScript))
- Execute(m_startScript, "BEFORE", m_operationName, ref m_remoteurl, ref m_localpath, m_timeout, false, m_options, null, null);
+ Execute(m_startScript, "BEFORE", operationname, ref remoteurl, ref localpath, m_timeout, false, m_options, null, null);
+
+ // Save options that might be set by a --run-script-before script so that the OnFinish method
+ // references the same values.
+ m_operationName = operationname;
+ m_remoteurl = remoteurl;
+ m_localpath = localpath;
}
public void OnFinish (object result)