From 523eebe47d3a8e10c2518af50a9e1e9b1459b915 Mon Sep 17 00:00:00 2001 From: gabime Date: Mon, 16 Sep 2019 11:58:26 +0300 Subject: [PATCH] Update utils.cpp --- tests/utils.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/utils.cpp b/tests/utils.cpp index 44a8e6c2..6ff210d6 100644 --- a/tests/utils.cpp +++ b/tests/utils.cpp @@ -77,10 +77,9 @@ std::size_t count_files(const std::string &folder) { size_t counter = 0; WIN32_FIND_DATA ffd; - HANDLE hFind = INVALID_HANDLE_VALUE; - + // Start iterating over the files in the path directory. - hFind = ::FindFirstFileA((folder + "\\*").c_str(), &ffd); + HANDLE hFind = ::FindFirstFileA((folder + "\\*").c_str(), &ffd); if (hFind != INVALID_HANDLE_VALUE) { do // Managed to locate and create an handle to that folder.