Fix library issue

This commit is contained in:
2025-09-20 10:35:53 +10:00
parent 9e329968d1
commit 4fc76e99da

View File

@@ -2056,12 +2056,12 @@ Literal exec(vector<Instruction> in, bool executingFunction) {
if (imported) break; if (imported) break;
string groundLibsDir = getenv("GROUND_LIBS"); string groundLibsDir = string(getenv("GROUND_LIBS")) + "/";
if (filesystem::exists(useName)) { if (filesystem::exists(useName)) {
// no need to do anything here // no need to do anything here
} else if (groundLibsDir != "" && filesystem::exists(groundLibsDir + useName + ".grnd")) { } else if (groundLibsDir != "" && filesystem::exists(groundLibsDir + useName)) {
useName = groundLibsDir + useName + ".grnd"; useName = groundLibsDir + useName;
} else { } else {
error("Could not find external Ground library in $GROUND_LIBS (currently set to " + groundLibsDir +") or current directory.", "libraryError"); error("Could not find external Ground library in $GROUND_LIBS (currently set to " + groundLibsDir +") or current directory.", "libraryError");
} }