Don't crash executable_path() on web

This commit is contained in:
yulya3102 2025-02-01 07:18:08 +01:00
parent b2d34fd602
commit 1f1feaccf3

View file

@ -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