From 58f7f85d6bcbb49cbf800de6985841572a290131 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 5 Nov 2026 16:20:19 +0000 Subject: [PATCH] Decompile 2 functions in Source/File/FileEnumeration.cpp Batch #12295 by cremane: 0 byte-identical, 2 confirmed by peer review. - fn_18246 EnumerateFileNames: logic confirmed by peer review - fn_18247 EnumerateFileNames: logic confirmed by peer review Peer-reviewed-by: Yommy, gordaoprogramas, dori Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/File/FileEnumeration.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Source/File/FileEnumeration.cpp b/Source/File/FileEnumeration.cpp index 5f24b028..5962c9d4 100644 --- a/Source/File/FileEnumeration.cpp +++ b/Source/File/FileEnumeration.cpp @@ -14,11 +14,12 @@ void EnumerateFileNames(std::list& names, const char* directory, co return; } + const std::string current("."); + const std::string parent(".."); do { - if (found.cFileName[0] == '.' && (found.cFileName[1] == 0 || (found.cFileName[1] == '.' && found.cFileName[2] == 0))) { - continue; + if (current != found.cFileName && parent != found.cFileName) { + names.push_back(std::string(found.cFileName)); } - names.push_back(std::string(found.cFileName)); } while (FindNextFileA(handle, &found)); FindClose(handle); } @@ -35,11 +36,12 @@ void EnumerateFileNames(std::vector& names, const char* directory, return; } + const std::string current("."); + const std::string parent(".."); do { - if (found.cFileName[0] == '.' && (found.cFileName[1] == 0 || (found.cFileName[1] == '.' && found.cFileName[2] == 0))) { - continue; + if (current != found.cFileName && parent != found.cFileName) { + names.push_back(std::string(found.cFileName)); } - names.push_back(std::string(found.cFileName)); } while (FindNextFileA(handle, &found)); FindClose(handle); }