From f22108f6b4640898b11245c8ae42890edd84789e Mon Sep 17 00:00:00 2001 From: MihailRis Date: Thu, 7 Nov 2024 21:29:54 +0300 Subject: [PATCH] fix core.open_folder on Windows --- src/util/platform.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/util/platform.cpp b/src/util/platform.cpp index 0b5553e8d..d4d399250 100644 --- a/src/util/platform.cpp +++ b/src/util/platform.cpp @@ -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()); -} \ No newline at end of file +#endif +}