mirror of
https://github.com/wiiu-env/RPXLoadingModule.git
synced 2024-11-22 09:59:17 +01:00
Fix FSChangeDirAsync hook to always make sure the directory ends with "/"
This commit is contained in:
parent
4551e08745
commit
4229909519
@ -347,6 +347,11 @@ DECL_FUNCTION(FSStatus, FSGetFreeSpaceSizeAsync, FSClient *client, FSCmdBlock *b
|
||||
DECL_FUNCTION(FSStatus, FSChangeDirAsync, FSClient *client, FSCmdBlock *block, const char *path, FSErrorFlag errorMask, FSAsyncData *asyncData) {
|
||||
DEBUG_FUNCTION_LINE("FSChangeDirAsync %s", path);
|
||||
strncpy(gWorkingDir, path, sizeof(gWorkingDir));
|
||||
int len = strlen(gWorkingDir);
|
||||
if(len > 0 && gWorkingDir[len-1] != '/'){
|
||||
gWorkingDir[len-1] = '/';
|
||||
gWorkingDir[len] = 0;
|
||||
}
|
||||
DCFlushRange(gWorkingDir, sizeof(gWorkingDir));
|
||||
return real_FSChangeDirAsync(client, block, path, errorMask, asyncData);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user