macOS: Fix browsing of directory paths with spaces (#1546)
Some checks failed
Build check / build (push) Waiting to run
Generate translation template / generate-pot (push) Failing after 1s

This commit is contained in:
neebyA 2025-05-04 04:46:01 -07:00 committed by GitHub
parent 00099c5ecc
commit fa7ae84314
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 6 deletions

View file

@ -668,7 +668,7 @@ void wxGameList::OnContextMenuSelected(wxCommandEvent& event)
{
fs::path path(gameInfo.GetBase().GetPath());
_stripPathFilename(path);
wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _pathToUtf8(path))));
wxLaunchDefaultApplication(wxHelper::FromPath(path));
break;
}
case kWikiPage:
@ -689,21 +689,21 @@ void wxGameList::OnContextMenuSelected(wxCommandEvent& event)
case kContextMenuSaveFolder:
{
wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _pathToUtf8(gameInfo.GetSaveFolder()))));
wxLaunchDefaultApplication(wxHelper::FromPath(gameInfo.GetSaveFolder()));
break;
}
case kContextMenuUpdateFolder:
{
fs::path path(gameInfo.GetUpdate().GetPath());
_stripPathFilename(path);
wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _pathToUtf8(path))));
wxLaunchDefaultApplication(wxHelper::FromPath(path));
break;
}
case kContextMenuDLCFolder:
{
fs::path path(gameInfo.GetAOC().front().GetPath());
_stripPathFilename(path);
wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _pathToUtf8(path))));
wxLaunchDefaultApplication(wxHelper::FromPath(path));
break;
}
case kContextMenuRemoveCache: