mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 11:09:37 -06:00
Use central subdirectory function. Fix compile issue with Tracy
This commit is contained in:
@@ -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(
|
||||
|
||||
Submodule ext/ghoul updated: 1ee8a47a1c...2972e7b963
@@ -32,6 +32,7 @@
|
||||
#include <openspace/scene/profile.h>
|
||||
#include <openspace/scene/sceneinitializer.h>
|
||||
#include <openspace/scripting/scriptengine.h>
|
||||
#include <openspace/util/updatestructures.h>
|
||||
#include <ghoul/lua/lua_helper.h>
|
||||
#include <stack>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user