mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-10 22:00:54 +01:00
Alternative check
This commit is contained in:
parent
d1df773e47
commit
3e437e4957
1 changed files with 3 additions and 3 deletions
|
@ -89,9 +89,7 @@ public:
|
||||||
std::string luauDirRel = ".";
|
std::string luauDirRel = ".";
|
||||||
std::string luauDirAbs;
|
std::string luauDirAbs;
|
||||||
|
|
||||||
#if !__APPLE__ || !TARGET_OS_IPHONE
|
#if TARGET_OS_IPHONE
|
||||||
std::optional<std::string> cwd = getCurrentWorkingDirectory();
|
|
||||||
#else
|
|
||||||
std::optional<std::string> cwd0 = getCurrentWorkingDirectory();
|
std::optional<std::string> cwd0 = getCurrentWorkingDirectory();
|
||||||
std::optional<std::string> cwd = getResourcePath();
|
std::optional<std::string> cwd = getResourcePath();
|
||||||
if (cwd && cwd0)
|
if (cwd && cwd0)
|
||||||
|
@ -105,6 +103,8 @@ public:
|
||||||
luauDirRel = "./" + _res.substr(_cwd.length());
|
luauDirRel = "./" + _res.substr(_cwd.length());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
std::optional<std::string> cwd = getCurrentWorkingDirectory();
|
||||||
#endif
|
#endif
|
||||||
REQUIRE_MESSAGE(cwd, "Error getting Luau path");
|
REQUIRE_MESSAGE(cwd, "Error getting Luau path");
|
||||||
std::replace((*cwd).begin(), (*cwd).end(), '\\', '/');
|
std::replace((*cwd).begin(), (*cwd).end(), '\\', '/');
|
||||||
|
|
Loading…
Add table
Reference in a new issue