Skip to content

Commit

Permalink
Merge pull request #65 from nref/bug/quote-open-url-command
Browse files Browse the repository at this point in the history
Support launching from paths with spaces
  • Loading branch information
nref authored Dec 7, 2024
2 parents 260c7f8 + 46b8e0c commit 2a63c3c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion BrowseRouter/DefaultBrowserService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class DefaultBrowserService(INotifyService notifier)
private const string _appID = "BrowseRouter";
private const string _appDescription = "Opens a different brower based on the URL";
private string AppIcon => App.ExePath + ",0";
private string AppOpenUrlCommand => App.ExePath + " %1";
private string AppOpenUrlCommand => $"{App.ExePath} %1".Quote();

private string AppKey => $"SOFTWARE\\{_appID}";
private string UrlKey => $"SOFTWARE\\Classes\\{_appID}URL";
Expand Down
6 changes: 6 additions & 0 deletions BrowseRouter/StringExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace BrowseRouter;

public static class StringExtensions
{
public static string Quote(this string s) => $"\"{s}\"";
}
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<Version>0.13.0</Version>
<Version>0.13.1</Version>
<Product>BrowseRouter</Product>
<Copyright>EnduraByte LLC 2024</Copyright>
<!-- Reduces flagging as malware -->
Expand Down

0 comments on commit 2a63c3c

Please sign in to comment.