Skip to content

Commit

Permalink
Attempt to load cards.cdb in root only if exists
Browse files Browse the repository at this point in the history
  • Loading branch information
edo9300 committed Feb 10, 2021
1 parent 383ee95 commit c3d690a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gframe/data_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
namespace ygo {

void DataHandler::LoadDatabases() {
if(std::ifstream("cards.cdb").good())
if(Utils::FileExists(EPRO_TEXT("cards.cdb")) && std::ifstream(EPRO_TEXT("cards.cdb")).good())
dataManager->LoadDB(EPRO_TEXT("cards.cdb"));
for(auto& file : Utils::FindFiles(EPRO_TEXT("./expansions/"), { EPRO_TEXT("cdb") }, 2))
dataManager->LoadDB(EPRO_TEXT("./expansions/") + file);
Expand Down

0 comments on commit c3d690a

Please sign in to comment.