forked from pyrite-dev/milsko
some code does this
This commit is contained in:
parent
55cb65be26
commit
9fc659b652
1 changed files with 6 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue