We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76e60a5 commit aae2ba6Copy full SHA for aae2ba6
SoundSwitch/Util/Url/BrowserUtil.cs
@@ -14,7 +14,15 @@ public static void OpenUrl(string url)
14
{
15
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
16
17
- Process.Start(new ProcessStartInfo(url) { UseShellExecute = true });
+ try
18
+ {
19
+ Process.Start(new ProcessStartInfo(url) {UseShellExecute = true});
20
+ }
21
+ catch (Exception)
22
23
+ url = url.Replace("&", "^&");
24
+ Process.Start(new ProcessStartInfo("cmd", $"/c start {url}") {CreateNoWindow = true});
25
26
}
27
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
28
@@ -26,9 +34,8 @@ public static void OpenUrl(string url)
34
35
else
36
29
- throw new ArgumentException("Unknown platform");
37
+ throw new ArgumentException("Unknown platform");
30
38
31
39
32
-
33
40
41
0 commit comments