Skip to content

Commit

Permalink
fix: log last error code instead of a BOOL
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiud committed Dec 20, 2023
1 parent 7d973f9 commit 9bc0df9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/logging_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9bc0df9

Please sign in to comment.