mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-04-29 14:59:26 -04:00
Fix browsing of directory paths with spaces
Open directories through default file handler rather than file URI scheme
This commit is contained in:
parent
b089ae5b32
commit
2e2d351e23
3 changed files with 6 additions and 6 deletions
|
@ -491,7 +491,7 @@ void TitleManager::OnSaveOpenDirectory(wxCommandEvent& event)
|
|||
if (!fs::exists(target) || !fs::is_directory(target))
|
||||
return;
|
||||
|
||||
wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _pathToUtf8(target))));
|
||||
wxLaunchDefaultApplication(wxHelper::FromPath(target));
|
||||
}
|
||||
|
||||
void TitleManager::OnSaveDelete(wxCommandEvent& event)
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -869,7 +869,7 @@ void wxTitleManagerList::OnContextMenuSelected(wxCommandEvent& event)
|
|||
case kContextMenuOpenDirectory:
|
||||
{
|
||||
const auto path = fs::is_directory(entry->path) ? entry->path : entry->path.parent_path();
|
||||
wxLaunchDefaultBrowser(wxHelper::FromUtf8(fmt::format("file:{}", _pathToUtf8(path))));
|
||||
wxLaunchDefaultApplication(wxHelper::FromPath(path));
|
||||
}
|
||||
break;
|
||||
case kContextMenuDelete:
|
||||
|
|
Loading…
Add table
Reference in a new issue