Fix bug with absolute meshdirs in included XML files. Fixes #1772.
PiperOrigin-RevId: 649150979 Change-Id: I5df08c689afc4f5bc625e989a8c0b9733fcfa3c2
This commit is contained in:
committed by
Copybara-Service
parent
9107d3b507
commit
2a4410e4e5
+2
-2
@@ -168,7 +168,7 @@ static std::string ResolveFilePath(XMLElement* e, std::string filename,
|
||||
|
||||
// TODO(kylebayes): We first look in the base model directory for files to
|
||||
// remain backwards compatible.
|
||||
std::string full_filename = dir + filename;
|
||||
std::string full_filename = mjuu_combinePaths(dir, filename);
|
||||
mjResource *resource = mju_openResource(full_filename.c_str(), nullptr, 0);
|
||||
if (resource != nullptr) {
|
||||
mju_closeResource(resource);
|
||||
@@ -185,7 +185,7 @@ static std::string ResolveFilePath(XMLElement* e, std::string filename,
|
||||
break;
|
||||
}
|
||||
}
|
||||
return path + filename;
|
||||
return mjuu_combinePaths(path, filename);
|
||||
}
|
||||
|
||||
// constructor
|
||||
|
||||
Reference in New Issue
Block a user