summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar LFsWang2016-06-01 14:04:58 +0800
committerGravatar LFsWang2016-06-01 14:04:58 +0800
commitd24d047d4571bd2a2583cbaffe974f32a3c04acb (patch)
treeb779fade21bc2cddf1424d4808ee237fbd9d3ee9
parentMerge pull request #1812 from JayFoxRox/refactor-shader (diff)
downloadyuzu-d24d047d4571bd2a2583cbaffe974f32a3c04acb.tar.gz
yuzu-d24d047d4571bd2a2583cbaffe974f32a3c04acb.tar.xz
yuzu-d24d047d4571bd2a2583cbaffe974f32a3c04acb.zip
AddFstEntriesToGameList - prevent loading a directory
-rw-r--r--src/citra_qt/game_list.cpp6
1 files changed, 3 insertions, 3 deletions
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
130 if (stop_processing) 130 if (stop_processing)
131 return false; // Breaks the callback loop. 131 return false; // Breaks the callback loop.
132 132
133 if (recursion > 0 && FileUtil::IsDirectory(physical_name)) { 133 if (!FileUtil::IsDirectory(physical_name)) {
134 AddFstEntriesToGameList(physical_name, recursion - 1);
135 } else {
136 std::unique_ptr<Loader::AppLoader> loader = Loader::GetLoader(physical_name); 134 std::unique_ptr<Loader::AppLoader> loader = Loader::GetLoader(physical_name);
137 if (!loader) 135 if (!loader)
138 return true; 136 return true;
@@ -145,6 +143,8 @@ void GameListWorker::AddFstEntriesToGameList(const std::string& dir_path, unsign
145 new GameListItem(QString::fromStdString(Loader::GetFileTypeString(loader->GetFileType()))), 143 new GameListItem(QString::fromStdString(Loader::GetFileTypeString(loader->GetFileType()))),
146 new GameListItemSize(FileUtil::GetSize(physical_name)), 144 new GameListItemSize(FileUtil::GetSize(physical_name)),
147 }); 145 });
146 } else if (recursion > 0) {
147 AddFstEntriesToGameList(physical_name, recursion - 1);
148 } 148 }
149 149
150 return true; 150 return true;