diff --git a/src/ScriptRunner/ScriptRunner.GUI/ParamsPanelFactory.cs b/src/ScriptRunner/ScriptRunner.GUI/ParamsPanelFactory.cs index 9d8edec..c93def6 100644 --- a/src/ScriptRunner/ScriptRunner.GUI/ParamsPanelFactory.cs +++ b/src/ScriptRunner/ScriptRunner.GUI/ParamsPanelFactory.cs @@ -228,7 +228,7 @@ private IControlRecord CreateControlRecord(ScriptParam p, string? value, int ind } }; case PromptType.FileContent: - if (Path.IsPathRooted(value) == false) + if (string.IsNullOrWhiteSpace(value) == false && Path.IsPathRooted(value) == false) { value = Path.GetFullPath(value, scriptConfig.WorkingDirectory); } @@ -247,7 +247,7 @@ private IControlRecord CreateControlRecord(ScriptParam p, string? value, int ind }; case PromptType.FilePicker: - if (Path.IsPathRooted(value) == false) + if (string.IsNullOrWhiteSpace(value)== false && Path.IsPathRooted(value) == false) { value = Path.GetFullPath(value, scriptConfig.WorkingDirectory); } @@ -263,7 +263,7 @@ private IControlRecord CreateControlRecord(ScriptParam p, string? value, int ind } }; case PromptType.DirectoryPicker: - if (Path.IsPathRooted(value) == false) + if (string.IsNullOrWhiteSpace(value)== false && Path.IsPathRooted(value) == false) { value = Path.GetFullPath(value, scriptConfig.WorkingDirectory); }