-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
path_mkdir not working on wii u with trailing slash #161
Comments
@barbudreadmon , just fixed this issue in mame2003-plus. The problem is if you send path_mkdir() a path to create containing a trailing slash, this path gets copied to basedir and then the slash is removed from basedir if it's defined as a gekko based system. It then checks if basedir is a valid path or not to create. If it's valid, it enables the non recursive function that actually makes the new directory by using the original path, dir, which still contains the trailing slash. So it fails on wiiu because it can't make path dir containing the trailing slash. They corrected the path it checks (basedir), but then it tries to make the bad path(dir). You need to also remove the trailing slash from dir then make sure your core isn't sending any file paths to path_mkdir with trailing slashes. We also force create our system and save directories anytime osd_get_path() in src/fileio.c is called if they are not already created by default. |
Yes, that's exactly what i did when fixing this issue in FBNeo a few months ago |
Ok cool. Didn't know where you guys were with this issue. Just figured I'd share what we did in case it was still an open issue. This ideally needs to be corrected in path_mkdir() by removing any trailing slashes in |
@barbudreadmon I just fixed path_mkdir() for gekko systems in #172. If it gets merged. Not sure if this will effect your fix in fbneo or not. |
ok, thanks for the heads-up |
@barbudreadmon #172 should fix these create issues if you want to test it with your core and wiiu. |
hmmm, how come you are freeing |
@barbudreadmon whoops. I meant to free newdir, fixed it now. Please test the updated fix. I don't have a wiiu but I believe this should fix it from the libretro side. If so you'll have to check your slash situation in fbneo |
I've no real means for testing this either :/. No wiiu sdk and no emulator able to run RA wiiu homebrew available on linux anyway. |
While there is this workaround :
libretro-common/file/file_path_io.c
Lines 199 to 211 in 44c1cd8
It still doesn't seem
path_mkdir
works properly on wii u when there is a trailing slash (the workaround makes sense so i'm not sure what's the issue and i don't have the means to debug this myself, all i can do is to try fixing this by removing the trailing slash in libretro/FBNeo@5b472aa then libretro/FBNeo@eeaabd1)The text was updated successfully, but these errors were encountered: