Merge pull request #8951 from jdgleaver/wii-mkdir-fix

(Wii) Fix recursive path_mkdir() operations
This commit is contained in:
Twinaphex 2019-06-10 17:40:37 +02:00 committed by GitHub
commit 1fea954e5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -205,6 +205,20 @@ bool path_mkdir(const char *dir)
return false;
}
#if defined(GEKKO)
{
size_t len = strlen(basedir);
/* path_parent_dir() keeps the trailing slash.
* On Wii, mkdir() fails if the path has a
* trailing slash...
* We must therefore remove it. */
if (len > 0)
if (basedir[len - 1] == '/')
basedir[len - 1] = '\0';
}
#endif
if (path_is_directory(basedir))
norecurse = true;
else