fix: try to create directories if they don't exist
Dieser Commit ist enthalten in:
Ursprung
6a12f0b70e
Commit
acacce2a8c
@ -70,6 +70,9 @@ Traintastic::Traintastic(const std::filesystem::path& dataDir) :
|
||||
console->notice(id, "Created new world");
|
||||
}}
|
||||
{
|
||||
if(!std::filesystem::is_directory(m_dataDir))
|
||||
std::filesystem::create_directories(m_dataDir);
|
||||
|
||||
//m_interfaceItems.add(mode);
|
||||
m_interfaceItems.add(console);
|
||||
m_interfaceItems.add(settings);
|
||||
|
||||
@ -33,6 +33,9 @@ WorldList::WorldList(const std::filesystem::path& path) :
|
||||
Object(),
|
||||
m_path{path}
|
||||
{
|
||||
if(!std::filesystem::is_directory(m_path))
|
||||
std::filesystem::create_directories(m_path);
|
||||
|
||||
buildIndex();
|
||||
}
|
||||
|
||||
|
||||
Laden…
x
In neuem Issue referenzieren
Einen Benutzer sperren