fix: log last error code instead of a BOOL (#994)
This commit is contained in:
parent
7d973f9b4e
commit
a9eecd7f9a
@ -724,8 +724,9 @@ static void GetFiles(const string& pattern, vector<string>* files) {
|
|||||||
do {
|
do {
|
||||||
files->push_back(dirname + data.cFileName);
|
files->push_back(dirname + data.cFileName);
|
||||||
} while (FindNextFileA(handle, &data));
|
} while (FindNextFileA(handle, &data));
|
||||||
BOOL result = FindClose(handle);
|
if (!FindClose(handle)) {
|
||||||
LOG_SYSRESULT(result != 0);
|
LOG_SYSRESULT(GetLastError());
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
# error There is no way to do glob.
|
# error There is no way to do glob.
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user