Commit 7cebc086 authored by mercury233's avatar mercury233

fix

parent 93610948
...@@ -822,9 +822,13 @@ void Game::LoadExpansionDB() { ...@@ -822,9 +822,13 @@ void Game::LoadExpansionDB() {
char *filepath = (char *)malloc(sizeof(char)*(len + strlen(foldername))); char *filepath = (char *)malloc(sizeof(char)*(len + strlen(foldername)));
strncpy(filepath, foldername, strlen(foldername) + 1); strncpy(filepath, foldername, strlen(foldername) + 1);
strncat(filepath, dirp->d_name, len); strncat(filepath, dirp->d_name, len);
#ifdef YGOPRO_SERVER_MODE
dataManager.LoadDB(filepath);
#else
std::cout << "Found file " << filepath << std::endl; std::cout << "Found file " << filepath << std::endl;
if(!dataManager.LoadDB(filepath)) if(!dataManager.LoadDB(filepath))
std::cout << "Error loading file" << std::endl; std::cout << "Error loading file" << std::endl;
#endif
free(filepath); free(filepath);
} }
closedir(dir); closedir(dir);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment