Fixed typo
This commit is contained in:
parent
7ada31d66a
commit
eb450b0240
@ -4,7 +4,6 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#else
|
#else
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <sys/types.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void prepare_logdir() {
|
void prepare_logdir() {
|
||||||
@ -52,7 +51,7 @@ std::size_t get_filesize(const std::string &filename) {
|
|||||||
throw std::runtime_error("Failed open file ");
|
throw std::runtime_error("Failed open file ");
|
||||||
}
|
}
|
||||||
|
|
||||||
return static_cast<std::size_t>(ifs.tellg());
|
return ifs.tellg();
|
||||||
}
|
}
|
||||||
|
|
||||||
// source: https://stackoverflow.com/a/2072890/192001
|
// source: https://stackoverflow.com/a/2072890/192001
|
||||||
@ -72,7 +71,7 @@ std::size_t count_files(const std::string &folder) {
|
|||||||
// Start iterating over the files in the folder directory.
|
// Start iterating over the files in the folder directory.
|
||||||
HANDLE hFind = ::FindFirstFileA((folder + "\\*").c_str(), &ffd);
|
HANDLE hFind = ::FindFirstFileA((folder + "\\*").c_str(), &ffd);
|
||||||
if (hFind != INVALID_HANDLE_VALUE) {
|
if (hFind != INVALID_HANDLE_VALUE) {
|
||||||
do // Managed to locate and create an handle to that folder.
|
do // Managed to locate and create a handle to that folder.
|
||||||
{
|
{
|
||||||
if (ffd.cFileName[0] != '.') counter++;
|
if (ffd.cFileName[0] != '.') counter++;
|
||||||
} while (::FindNextFileA(hFind, &ffd) != 0);
|
} while (::FindNextFileA(hFind, &ffd) != 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user