From 7891c2d861cb98418e0a8ac2f37b271c2a38b66d Mon Sep 17 00:00:00 2001 From: "fix94.1" Date: Thu, 8 Mar 2012 12:52:01 +0000 Subject: [PATCH] -(hopefully) last change about addition from r183, now everything should work fine again and a custom folder name should be usable for gc games on usb --- source/list/cachedlist.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/list/cachedlist.cpp b/source/list/cachedlist.cpp index 5e15d814..70c862e4 100644 --- a/source/list/cachedlist.cpp +++ b/source/list/cachedlist.cpp @@ -7,7 +7,7 @@ void CachedList::Load(string path, string containing, string m_lastLanguage) gprintf("\nLoading files containing %s in %s\n", containing.c_str(), path.c_str()); m_loaded = false; m_database = sfmt("%s/%s.db", m_cacheDir.c_str(), (make_db_name(path)).c_str()); - + m_wbfsFS = strncasecmp(DeviceHandler::Instance()->PathToFSName(path.c_str()), "WBFS", 4) == 0; bool update_games = false; @@ -23,9 +23,11 @@ void CachedList::Load(string path, string containing, string m_lastLanguage) update_games = strcasestr(path.c_str(), "wbfs") != NULL && force_update[COVERFLOW_USB]; update_homebrew = strcasestr(path.c_str(), "apps") != NULL && force_update[COVERFLOW_HOMEBREW]; - update_dml = strcasestr(path.c_str(), "games") != NULL && force_update[COVERFLOW_DML]; - - gprintf("update_games=%d update_homebrew=%d\n", update_games, update_homebrew); + + const char* partition = DeviceName[DeviceHandler::Instance()->PathToDriveType(path.c_str())]; + update_dml = strcasestr(path.c_str(), sfmt(strncmp(partition, "sd", 2) != 0 ? m_DMLgameDir.c_str() : "%s:/games", partition).c_str()) != NULL && force_update[COVERFLOW_DML]; + + gprintf("update_games=%d update_homebrew=%d update_dml=%d\n", update_games, update_homebrew, update_dml); if(update_games || update_homebrew || update_dml) remove(m_database.c_str());