Update utils.cpp

This commit is contained in:
gabime 2019-09-16 11:58:26 +03:00
parent b303d8bc40
commit 523eebe47d
1 changed files with 2 additions and 3 deletions

View File

@ -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.