FEXConfig: Have it create AppConfig folder on save

Otherwise it will claim that the AppConfig was saved and won't actually be
This commit is contained in:
Ryan Houdek committed 2021-06-25 04:03:16 -07:00
1 parent 35157c1251
commit bb85f90f78
1 file changed
+13 -2
+13 -2
View File
@@ -90,10 +90,21 @@ namespace FEXCore::Config {
!std::filesystem::create_directories(ConfigFile)) {
LogMan::Msg::D("Couldn't create config directory: '%s'", ConfigFile.c_str());
// Let's go local in this case
return "./";
return "./" + Filename + ".json";
}
ConfigFile += "AppConfig/" + Filename + ".json";
ConfigFile += "AppConfig/";
// Attempt to create the local folder if it doesn't exist
if (!Global &&
!std::filesystem::exists(ConfigFile) &&
!std::filesystem::create_directories(ConfigFile)) {
LogMan::Msg::D("Couldn't create AppConfig directory: '%s'", ConfigFile.c_str());
// Let's go local in this case
return "./" + Filename + ".json";
}
ConfigFile += Filename + ".json";
return ConfigFile;
}