Add VFS handling logic to mj_openResource.
PiperOrigin-RevId: 653124909 Change-Id: I4d031eb0bfb0070f8493753d2aeaac60ac283b85
This commit is contained in:
committed by
Copybara-Service
parent
7f46e936f6
commit
2cf352c2e6
+2
-1
@@ -169,7 +169,8 @@ 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 = mjuu_combinePaths(dir, filename);
|
||||
mjResource *resource = mju_openResource(full_filename.c_str(), nullptr, 0);
|
||||
mjResource *resource = mju_openResource(full_filename.c_str(), nullptr,
|
||||
nullptr, 0);
|
||||
if (resource != nullptr) {
|
||||
mju_closeResource(resource);
|
||||
return filename;
|
||||
|
||||
Reference in New Issue
Block a user