Skip to content

Commit

Permalink
fix core.open_folder on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
MihailRis committed Nov 7, 2024
1 parent aba994f commit f22108f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/util/platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit f22108f

Please sign in to comment.