| 89 | } |
| 90 | |
| 91 | bool verifyHomeFolderExists() |
| 92 | { |
| 93 | //make sure the config directory exists |
| 94 | std::string home = getHomePath(); |
| 95 | std::string configDir = home + "/.emulationstation"; |
| 96 | if(!fs::exists(configDir)) |
| 97 | { |
| 98 | std::cout << "Creating config directory \"" << configDir << "\"\n"; |
| 99 | fs::create_directory(configDir); |
| 100 | if(!fs::exists(configDir)) |
| 101 | { |
| 102 | std::cerr << "Config directory could not be created!\n"; |
| 103 | return false; |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | return true; |
| 108 | } |
| 109 | |
| 110 | //called on exit, assuming we get far enough to have the log initialized |
| 111 | void onExit() |