From 9bc0df9c66d227bdeb22e4c67373ef42dbd58336 Mon Sep 17 00:00:00 2001 From: Sergiu Deitsch Date: Tue, 19 Dec 2023 15:40:52 +0100 Subject: [PATCH] fix: log last error code instead of a BOOL --- src/logging_unittest.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/logging_unittest.cc b/src/logging_unittest.cc index ddd434f12..21232f685 100644 --- a/src/logging_unittest.cc +++ b/src/logging_unittest.cc @@ -724,8 +724,9 @@ static void GetFiles(const string& pattern, vector* 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