Browse Source
Merge pull request #6532 from evan-choi/fixes/open-browser
Fix OpenBrowser on Linux
pull/6755/head
Dan Walmsley
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
1 deletions
-
src/Avalonia.Dialogs/AboutAvaloniaDialog.xaml.cs
|
|
@ -1,6 +1,7 @@ |
|
|
using System; |
|
|
using System; |
|
|
using System.Diagnostics; |
|
|
using System.Diagnostics; |
|
|
using System.Runtime.InteropServices; |
|
|
using System.Runtime.InteropServices; |
|
|
|
|
|
using System.Text.RegularExpressions; |
|
|
using Avalonia.Controls; |
|
|
using Avalonia.Controls; |
|
|
using Avalonia.Markup.Xaml; |
|
|
using Avalonia.Markup.Xaml; |
|
|
|
|
|
|
|
|
@ -42,7 +43,8 @@ namespace Avalonia.Dialogs |
|
|
|
|
|
|
|
|
private static void ShellExec(string cmd, bool waitForExit = true) |
|
|
private static void ShellExec(string cmd, bool waitForExit = true) |
|
|
{ |
|
|
{ |
|
|
var escapedArgs = cmd.Replace("\"", "\\\""); |
|
|
var escapedArgs = Regex.Replace(cmd, "(?=[`~!#&*()|;'<>])", "\\") |
|
|
|
|
|
.Replace("\"", "\\\\\\\""); |
|
|
|
|
|
|
|
|
using (var process = Process.Start( |
|
|
using (var process = Process.Start( |
|
|
new ProcessStartInfo |
|
|
new ProcessStartInfo |
|
|
|