mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-12-01 21:44:14 +01:00
mr.casepath
This commit is contained in:
parent
86a7d4415b
commit
bedc066cfd
@ -27,6 +27,7 @@ void GetLocalTime_CP(SYSTEMTIME *out) {
|
|||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
HANDLE FindFirstFile(const char* pathname, WIN32_FIND_DATA* firstfile) {
|
HANDLE FindFirstFile(const char* pathname, WIN32_FIND_DATA* firstfile) {
|
||||||
char pathCopy[32];
|
char pathCopy[32];
|
||||||
|
char constructedPath[32];
|
||||||
|
|
||||||
strncpy(pathCopy, pathname, 32);
|
strncpy(pathCopy, pathname, 32);
|
||||||
char* folder = strtok(pathCopy, "*");
|
char* folder = strtok(pathCopy, "*");
|
||||||
@ -35,15 +36,15 @@ HANDLE FindFirstFile(const char* pathname, WIN32_FIND_DATA* firstfile) {
|
|||||||
char *realFolder = casepath(folder);
|
char *realFolder = casepath(folder);
|
||||||
char *extension = nil;
|
char *extension = nil;
|
||||||
if (realFolder) {
|
if (realFolder) {
|
||||||
realFolder[strlen(realFolder)] = '*';
|
sprintf(constructedPath, "%s*", realFolder);
|
||||||
extension = strtok(NULL, "*");
|
extension = strtok(NULL, "*");
|
||||||
if (extension) {
|
if (extension) {
|
||||||
strcat(realFolder, extension);
|
strcat(constructedPath, extension);
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(pathCopy, realFolder, 32);
|
|
||||||
free(realFolder);
|
free(realFolder);
|
||||||
folder = strtok(pathCopy, "*");
|
folder = strtok(constructedPath, "*");
|
||||||
|
extension = strtok(NULL, "*");
|
||||||
} else {
|
} else {
|
||||||
// Wildcard (*)
|
// Wildcard (*)
|
||||||
if (strlen(folder) + 1 != strlen(pathname))
|
if (strlen(folder) + 1 != strlen(pathname))
|
||||||
|
Loading…
Reference in New Issue
Block a user