From 6fd80818d413b001e14cea31fbc78cb4f4b2d4e3 Mon Sep 17 00:00:00 2001 From: William Adam-Grenier Date: Mon, 3 Mar 2025 21:42:34 -0500 Subject: [PATCH] Fix Directory Being Opened As File (#8) Fixed a bug where the directory would be opened as a file. Add a check to avoid this. --- XenosRecomp/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/XenosRecomp/main.cpp b/XenosRecomp/main.cpp index 3dd0a06..ce0e08d 100644 --- a/XenosRecomp/main.cpp +++ b/XenosRecomp/main.cpp @@ -74,6 +74,11 @@ int main(int argc, char** argv) for (auto& file : std::filesystem::directory_iterator(input)) { + if (std::filesystem::is_directory(file)) + { + continue; + } + size_t fileSize = 0; auto fileData = readAllBytes(file.path().string().c_str(), fileSize); bool foundAny = false;