some code does this
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
Nishi 2026-04-04 00:38:18 +09:00
commit 9fc659b652
Signed by: nishi
GPG key ID: 27EF69B208EB9343

View file

@ -18,7 +18,12 @@ void* MwDirectoryOpen(const char* path) {
#ifdef _WIN32
char* p = malloc(strlen(path) + 2 + 1);
strcpy(p, path);
strcat(p, "/*");
if(strchr(path, '/') != NULL){
strcat(p, "/");
}else{
strcat(p, "\\");
}
strcat(p, "*");
if((dir->hFind = FindFirstFile(p, &dir->ffd)) == INVALID_HANDLE_VALUE) {
free(p);
free(dir);