This commit is contained in:
mossimo
2021-06-15 09:11:13 +08:00
parent 6b66a2e3bd
commit 5690613db2
@@ -23,11 +23,13 @@ namespace System.Application.Services.Implementation
void IDesktopPlatformService.StartProcess(string name, string filePath)
{
var p = Process.Start(new ProcessStartInfo
var pInfo = new ProcessStartInfo
{
FileName = "open",
Arguments = $"-a \"{name}\" \"{filePath}\"",
});
};
pInfo.UseShellExecute = true;
var p = Process.Start(pInfo);
if (p == null) throw new FileNotFoundException(name);
p.Close();
}