[PTRun][WebSearch]Fix empty browser pattern crash (#18480)
This commit is contained in:
Родитель
f9e967973e
Коммит
a9181a0184
|
@ -150,7 +150,11 @@ namespace Wox.Infrastructure
|
|||
|
||||
public static bool OpenCommandInShell(string path, string pattern, string arguments, string workingDir = null, ShellRunAsType runAs = ShellRunAsType.None, bool runWithHiddenWindow = false)
|
||||
{
|
||||
if (pattern.Contains("%1", StringComparison.Ordinal))
|
||||
if (string.IsNullOrEmpty(pattern))
|
||||
{
|
||||
Log.Warn("Trying to run OpenCommandInShell with an empty pattern. The default browser definition might have issues.", typeof(Helper));
|
||||
}
|
||||
else if (pattern.Contains("%1", StringComparison.Ordinal))
|
||||
{
|
||||
arguments = pattern.Replace("%1", arguments);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче