From d24d047d4571bd2a2583cbaffe974f32a3c04acb Mon Sep 17 00:00:00 2001 From: LFsWang Date: Wed, 1 Jun 2016 14:04:58 +0800 Subject: AddFstEntriesToGameList - prevent loading a directory --- src/citra_qt/game_list.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/citra_qt/game_list.cpp b/src/citra_qt/game_list.cpp index 49cb98e70..15484fae3 100644 --- a/src/citra_qt/game_list.cpp +++ b/src/citra_qt/game_list.cpp @@ -130,9 +130,7 @@ void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, unsign if (stop_processing) return false; // Breaks the callback loop. - if (recursion > 0 && FileUtil::IsDirectory(physical_name)) { - AddFstEntriesToGameList(physical_name, recursion - 1); - } else { + if (!FileUtil::IsDirectory(physical_name)) { std::unique_ptr loader = Loader::GetLoader(physical_name); if (!loader) return true; @@ -145,6 +143,8 @@ void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, unsign new GameListItem(QString::fromStdString(Loader::GetFileTypeString(loader->GetFileType()))), new GameListItemSize(FileUtil::GetSize(physical_name)), }); + } else if (recursion > 0) { + AddFstEntriesToGameList(physical_name, recursion - 1); } return true; -- cgit v1.2.3