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 {
|
||||
files->push_back(dirname + data.cFileName);
|
||||
} while (FindNextFileA(handle, &data));
|
||||
BOOL result = FindClose(handle);
|
||||
LOG_SYSRESULT(result != 0);
|
||||
if (!FindClose(handle)) {
|
||||
LOG_SYSRESULT(GetLastError());
|
||||
}
|
||||
#else
|
||||
# error There is no way to do glob.
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user