| 890 | |
| 891 | |
| 892 | void openDirectory(const std::string& path) { |
| 893 | if (path.empty()) |
| 894 | return; |
| 895 | |
| 896 | INFO("Opening directory %s", path.c_str()); |
| 897 | |
| 898 | std::string pathL = path; |
| 899 | std::thread t([=] { |
| 900 | #if defined ARCH_LIN |
| 901 | std::string command = "xdg-open \"" + pathL + "\""; |
| 902 | (void) std::system(command.c_str()); |
| 903 | #endif |
| 904 | #if defined ARCH_MAC |
| 905 | std::string command = "open \"" + pathL + "\""; |
| 906 | std::system(command.c_str()); |
| 907 | #endif |
| 908 | #if defined ARCH_WIN |
| 909 | ShellExecuteW(NULL, L"explore", string::UTF8toUTF16(pathL).c_str(), NULL, NULL, SW_SHOWDEFAULT); |
| 910 | #endif |
| 911 | }); |
| 912 | t.detach(); |
| 913 | } |
| 914 | |
| 915 | |
| 916 | void runProcessDetached(const std::string& path) { |
no test coverage detected