diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp index f6f7e7963f..ba64091dbb 100644 --- a/apps/OpenSpace/main.cpp +++ b/apps/OpenSpace/main.cpp @@ -1416,18 +1416,15 @@ int main(int argc, char* argv[]) { settings.hasStartedBefore = true; const std::filesystem::path profile = global::configuration->profile; - auto isSubDirectory = [](std::filesystem::path p, std::filesystem::path root) { - while (p != p.parent_path()) { - if (p == root) { - return true; - } - p = p.parent_path(); - } - return false; - }; - const bool isDefaultProfile = isSubDirectory(profile, absPath("${PROFILES}")); - const bool isUserProfile = isSubDirectory(profile, absPath("${USER_PROFILES}")); + const bool isDefaultProfile = ghoul::filesystem::isSubdirectory( + profile, + absPath("${PROFILES}") + ); + const bool isUserProfile = ghoul::filesystem::isSubdirectory( + profile, + absPath("${USER_PROFILES}") + ); if (isDefaultProfile) { std::filesystem::path p = std::filesystem::relative( diff --git a/ext/ghoul b/ext/ghoul index 1ee8a47a1c..2972e7b963 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 1ee8a47a1cb861efd4d446e34142cd45a53819e6 +Subproject commit 2972e7b963abe1a0ddd57efd8aaf28840a8da37e diff --git a/src/scene/scene.cpp b/src/scene/scene.cpp index 36f60772ce..b2108d30a7 100644 --- a/src/scene/scene.cpp +++ b/src/scene/scene.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include