fix core.open_folder on Windows

This commit is contained in:
MihailRis 2024-11-07 21:29:54 +03:00
parent aba994f2b2
commit f22108f6b4

View File

@ -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
}