From c65c3c719281126343250685c0fe7abcee8f4517 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Tue, 10 Dec 2024 11:50:42 +0100 Subject: [PATCH] FS: Fix directory listing Previously, the host directory iterator stopped advancing at the last listed entry (instead of right after it). --- source/processes/fs.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/processes/fs.cpp b/source/processes/fs.cpp index 9a202a1..98d5743 100644 --- a/source/processes/fs.cpp +++ b/source/processes/fs.cpp @@ -533,8 +533,9 @@ public: // auto it = iter; uint32_t actual_entries = 0; - for (auto& entry : iter) { - // TODO: Merge with Entry defined by platform + while (iter != std::filesystem::directory_iterator{}) { + auto entry = *iter++; + // TODO: Merge with Entry defined by platform struct Entry { uint16_t name_utf16[0x20c / 2]; uint8_t short_name[0xa]; // short 8.3 filename without extension