mirror of
https://github.com/facebook/zstd.git
synced 2025-07-29 11:21:22 +03:00
use FindFirstFileA instead of FindFirstFile
This commit is contained in:
@ -269,7 +269,7 @@ UTIL_STATIC int UTIL_prepareFileList(const char *dirName, char** bufStart, size_
|
|||||||
{
|
{
|
||||||
char* path;
|
char* path;
|
||||||
int dirLength, fnameLength, pathLength, nbFiles = 0;
|
int dirLength, fnameLength, pathLength, nbFiles = 0;
|
||||||
WIN32_FIND_DATA cFile;
|
WIN32_FIND_DATAA cFile;
|
||||||
HANDLE hFile;
|
HANDLE hFile;
|
||||||
|
|
||||||
dirLength = (int)strlen(dirName);
|
dirLength = (int)strlen(dirName);
|
||||||
@ -281,7 +281,7 @@ UTIL_STATIC int UTIL_prepareFileList(const char *dirName, char** bufStart, size_
|
|||||||
path[dirLength+1] = '*';
|
path[dirLength+1] = '*';
|
||||||
path[dirLength+2] = 0;
|
path[dirLength+2] = 0;
|
||||||
|
|
||||||
hFile=FindFirstFile(path, &cFile);
|
hFile=FindFirstFileA(path, &cFile);
|
||||||
if (hFile == INVALID_HANDLE_VALUE) {
|
if (hFile == INVALID_HANDLE_VALUE) {
|
||||||
fprintf(stderr, "Cannot open directory '%s'\n", dirName);
|
fprintf(stderr, "Cannot open directory '%s'\n", dirName);
|
||||||
return 0;
|
return 0;
|
||||||
@ -318,7 +318,7 @@ UTIL_STATIC int UTIL_prepareFileList(const char *dirName, char** bufStart, size_
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
free(path);
|
free(path);
|
||||||
} while (FindNextFile(hFile, &cFile));
|
} while (FindNextFileA(hFile, &cFile));
|
||||||
|
|
||||||
FindClose(hFile);
|
FindClose(hFile);
|
||||||
return nbFiles;
|
return nbFiles;
|
||||||
|
Reference in New Issue
Block a user