mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix core.open_folder on Windows
This commit is contained in:
parent
aba994f2b2
commit
f22108f6b4
1 changed files with 4 additions and 2 deletions
|
|
@ -82,10 +82,12 @@ void platform::open_folder(const std::filesystem::path& folder) {
|
|||
}
|
||||
#ifdef __APPLE__
|
||||
auto cmd = "open " + util::quote(folder.u8string());
|
||||
system(cmd.c_str());
|
||||
#elif defined(_WIN32)
|
||||
auto cmd = "start explorer " + util::quote(folder.u8string());
|
||||
ShellExecuteW(NULL, L"open", folder.wstring().c_str(), NULL, NULL, SW_SHOWDEFAULT);
|
||||
#else
|
||||
auto cmd = "xdg-open " + util::quote(folder.u8string());
|
||||
#endif
|
||||
system(cmd.c_str());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue