Fix mju_getfiledir when the path contains a mixture of / and \.

PiperOrigin-RevId: 529754511
Change-Id: Ifce2b86bc339a8cae584db639b7901b270e56384
This commit is contained in:
Saran Tunyasuvunakool
2023-05-05 10:35:04 -07:00
committed by Copybara-Service
parent 7998fc7fca
commit 496755a55d
3 changed files with 25 additions and 19 deletions
+2 -2
View File
@@ -37,8 +37,8 @@ MJAPI int mju_readResource(mjResource* resource, const void** buffer);
// sets for a resource with a name partitioned as {dir}{filename}, the dir and ndir pointers
MJAPI void mju_getResourceDir(mjResource* resource, const char** dir, int* ndir);
// get directory of a file in the OS filesystem
void mju_getfiledir(const char* filename, const char** dir, int* ndir);
// get the length of the dirname portion of a given path
int mju_dirnamelen(const char* path);
// read file into memory buffer (allocated here with mju_malloc)
void* mju_fileToMemory(const char* filename, int* filesize);