mirror of https://github.com/stella-emu/stella.git
Prefer settings DB for import in case of ambiguity.
This commit is contained in:
parent
e06b58efaf
commit
5888ea2adb
|
@ -81,12 +81,7 @@ void SettingsDb::initializeDb() {
|
|||
FilesystemNode legacyConfigDatabase{myDatabaseDirectory};
|
||||
legacyConfigDatabase /= "settings.sqlite3";
|
||||
|
||||
if (legacyConfigFile.exists() && legacyConfigFile.isFile()) {
|
||||
Logger::info("importing old settings from " + legacyConfigFile.getPath());
|
||||
|
||||
mySettingsRepository->save(KeyValueRepositoryConfigfile{legacyConfigFile}.load());
|
||||
}
|
||||
else if (legacyConfigDatabase.exists() && legacyConfigDatabase.isFile()) {
|
||||
if (legacyConfigDatabase.exists() && legacyConfigDatabase.isFile()) {
|
||||
Logger::info("importing old settings from " + legacyConfigDatabase.getPath());
|
||||
|
||||
try {
|
||||
|
@ -104,6 +99,11 @@ void SettingsDb::initializeDb() {
|
|||
Logger::error(err.what());
|
||||
}
|
||||
}
|
||||
else if (legacyConfigFile.exists() && legacyConfigFile.isFile()) {
|
||||
Logger::info("importing old settings from " + legacyConfigFile.getPath());
|
||||
|
||||
mySettingsRepository->save(KeyValueRepositoryConfigfile(legacyConfigFile).load());
|
||||
}
|
||||
|
||||
myDb->setUserVersion(CURRENT_VERSION);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue