Browse Source

Test datadir in conf file exists

0.16
MeshCollider 7 years ago
parent
commit
529b866759
  1. 3
      src/util.cpp

3
src/util.cpp

@ -639,6 +639,9 @@ void ArgsManager::ReadConfigFile(const std::string& confPath)
} }
// If datadir is changed in .conf file: // If datadir is changed in .conf file:
ClearDatadirCache(); ClearDatadirCache();
if (!fs::is_directory(GetDataDir(false))) {
throw std::runtime_error(strprintf("specified data directory \"%s\" does not exist.", gArgs.GetArg("-datadir", "").c_str()));
}
} }
#ifndef WIN32 #ifndef WIN32

Loading…
Cancel
Save