mirror of
https://github.com/2dust/v2rayN.git
synced 2025-04-19 13:42:24 +00:00
Fix ProcUtils NoAssociatedProcess issue
This commit is contained in:
parent
bccab41c8f
commit
e986dc189e
1 changed files with 4 additions and 4 deletions
|
@ -24,18 +24,18 @@ public static class ProcUtils
|
|||
if (arguments.Contains(' '))
|
||||
arguments = arguments.AppendQuotes();
|
||||
|
||||
Process process = new()
|
||||
Process proc = new()
|
||||
{
|
||||
StartInfo = new ProcessStartInfo
|
||||
{
|
||||
UseShellExecute = true,
|
||||
FileName = fileName,
|
||||
Arguments = arguments,
|
||||
WorkingDirectory = dir
|
||||
WorkingDirectory = dir ?? string.Empty
|
||||
}
|
||||
};
|
||||
process.Start();
|
||||
return process.Id;
|
||||
proc.Start();
|
||||
return dir is null ? null : proc.Id;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue