From 1f1feaccf3e851cbbff3808d843643df52120e02 Mon Sep 17 00:00:00 2001 From: yulya3102 Date: Sat, 1 Feb 2025 07:18:08 +0100 Subject: [PATCH] Don't crash executable_path() on web --- libs/util/source/executable_path.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/util/source/executable_path.cpp b/libs/util/source/executable_path.cpp index 3095fe52..a261eb83 100644 --- a/libs/util/source/executable_path.cpp +++ b/libs/util/source/executable_path.cpp @@ -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