Unfix gay

This commit is contained in:
TotallyNotElite 2018-09-14 19:26:57 +02:00
parent 15354f6c9b
commit a0565343e0
2 changed files with 1 additions and 8 deletions

View File

@ -93,10 +93,6 @@ static CatCommand save("save", "", [](const CCommand &args) {
void load_thread(const CCommand &args)
{
#if not ENABLE_VISUALS
std::this_thread::sleep_for(std::chrono_literals::operator""s(10));
settings::RVarLock.store(true);
#endif
std::this_thread::sleep_for(std::chrono_literals::operator""s(1));
settings::SettingsReader loader{ settings::Manager::instance() };
if (args.ArgC() == 1)
@ -129,9 +125,7 @@ void load_thread(const CCommand &args)
static CatCommand load("load", "", [](const CCommand &args) {
if (!settings::RVarLock.load())
{
#if ENABLE_VISUALS
settings::RVarLock.store(true);
#endif
std::thread saver(load_thread, args);
saver.detach();
}

View File

@ -93,10 +93,9 @@ settings::SettingsReader::SettingsReader(settings::Manager &manager)
bool settings::SettingsReader::loadFrom(std::string path)
{
logging::Info("Path: %s", path.c_str());
stream.open(path, std::ios::in | std::ios::binary);
if (stream.bad() || stream.fail())
if (stream.fail())
{
logging::Info("cat_load: Can't access file!");
return false;