some code does this
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good
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
|
#ifdef _WIN32
|
||||||
char* p = malloc(strlen(path) + 2 + 1);
|
char* p = malloc(strlen(path) + 2 + 1);
|
||||||
strcpy(p, path);
|
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) {
|
if((dir->hFind = FindFirstFile(p, &dir->ffd)) == INVALID_HANDLE_VALUE) {
|
||||||
free(p);
|
free(p);
|
||||||
free(dir);
|
free(dir);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue