Don't crash executable_path() on web
This commit is contained in:
parent
b2d34fd602
commit
1f1feaccf3
1 changed files with 2 additions and 0 deletions
|
|
@ -39,6 +39,8 @@ namespace psemek::util
|
|||
std::string path(path_length, '\0');
|
||||
_NSGetExecutablePath(path.data(), &path_length);
|
||||
return std::filesystem::path(std::move(path));
|
||||
#elif defined __EMSCRIPTEN__
|
||||
return std::filesystem::canonical("");
|
||||
#else
|
||||
throw exception("executable_path() is not implemented for this platform");
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue