mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-20 04:03:57 +00:00
Accurate file enumeration
This commit is contained in:
@@ -1422,11 +1422,14 @@ namespace
|
||||
|
||||
std::vector<file_entry> scan_directory(const std::filesystem::path& dir)
|
||||
{
|
||||
std::vector<file_entry> files{};
|
||||
std::vector<file_entry> files{
|
||||
{"."},
|
||||
{".."},
|
||||
};
|
||||
|
||||
for (const auto& file : std::filesystem::directory_iterator(dir))
|
||||
{
|
||||
files.emplace_back(file.path());
|
||||
files.emplace_back(file.path().filename());
|
||||
}
|
||||
|
||||
return files;
|
||||
|
||||
Reference in New Issue
Block a user