MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / verifyHomeFolderExists

Function verifyHomeFolderExists

src/main.cpp:91–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91bool 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
111void onExit()

Callers 1

mainFunction · 0.85

Calls 1

getHomePathFunction · 0.85

Tested by

no test coverage detected