Qt/game_list_frame: Ignore file entries when adding disc/game directories

Fixes #6212.
This commit is contained in:
Alex James 2019-07-15 19:26:22 -05:00 committed by Ivan
parent 736ec4035e
commit 397e5dd1ea

View file

@ -407,7 +407,7 @@ void game_list_frame::Refresh(const bool fromDrive, const bool scrollAfter)
{
for (const auto& entry : fs::dir(path))
{
if (entry.name == "." || entry.name == "..")
if (!entry.is_directory || entry.name == "." || entry.name == "..")
{
continue;
}
@ -418,7 +418,7 @@ void game_list_frame::Refresh(const bool fromDrive, const bool scrollAfter)
{
add_disc_dir(entry_path);
}
else if (entry.is_directory)
else
{
path_list.emplace_back(entry_path);
}