MCPcopy Create free account
hub / github.com/HailToDodongo/pyrite64 / openFile

Method openFile

src/utils/proc.cpp:213–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213bool Utils::Proc::openFile(const std::string &path)
214{
215#if defined(__linux__)
216 if (isWSL()) {
217 const auto windowsPath = wslToWindowsPath(path);
218 if (windowsPath) {
219 const char* args[] = { "cmd.exe", "/C", "start", "", windowsPath->c_str(), NULL };
220 SDL_CreateProcess(args, false);
221 return true;
222 }
223 SDL_OpenURL(path.c_str());
224 return false;
225 }
226#endif
227 SDL_OpenURL(path.c_str());
228 return true;
229}
230
231bool Utils::Proc::openInFileBrowser(const std::string &path)
232{

Callers

nothing calls this directly

Calls 2

isWSLFunction · 0.85
wslToWindowsPathFunction · 0.85

Tested by

no test coverage detected