Skip to content

Commit

Permalink
Fix file picker
Browse files Browse the repository at this point in the history
  • Loading branch information
cezarypiatek committed Aug 9, 2023
1 parent e7bf45a commit 44a9ac6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ScriptRunner/ScriptRunner.GUI/ParamsPanelFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand All @@ -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);
}
Expand Down

0 comments on commit 44a9ac6

Please sign in to comment.