patch_manager: fix missing config path

This commit is contained in:
Megamouse 2020-06-23 21:31:32 +02:00
parent 628cb1c779
commit 431e0eb30c

View File

@ -65,7 +65,15 @@ patch_engine::patch_engine()
std::string patch_engine::get_patch_config_path() std::string patch_engine::get_patch_config_path()
{ {
#ifdef _WIN32 #ifdef _WIN32
return fs::get_config_dir() + "config/patch_config.yml"; const std::string config_dir = fs::get_config_dir() + "config/";
const std::string patch_path = config_dir + "patch_config.yml";
if (!fs::create_path(config_dir))
{
patch_log.error("Could not create path: %s", patch_path);
}
return patch_path;
#else #else
return fs::get_config_dir() + "patch_config.yml"; return fs::get_config_dir() + "patch_config.yml";
#endif #endif