Closed ghost closed 2 years ago
Ah, this has been working for me because I did PHYSFS_setRoot("/assets") and sanitizePlatformIndependentPath removes the '/' but we keep the length before sanitizing.
This was actually messier than expected, but it should be fixed now.
I'm calling PHYSFS_stat() on a directory contained in the root, and with a single ZIP mounted and a "root directory" set to "data"
In function verifyPath(), the "prepend the root directory, if any" section, fname[] is being set to "dat/dir" rather than "data/dir". The issue seems to be an off-by-one, when prepending the root directory.
Old code:
Modified code:
This seems to fix the problem, but I'm not sure if it could introduce problems elsewhere.