From b55bdc3a1d3b32ceb0baf7f659857ad6353b48e2 Mon Sep 17 00:00:00 2001 From: Christian Speckner Date: Sat, 2 Jan 2021 17:50:58 +0100 Subject: [PATCH] Fix settings file import on windows. --- src/common/repository/sqlite/StellaDb.cxx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/common/repository/sqlite/StellaDb.cxx b/src/common/repository/sqlite/StellaDb.cxx index 98212961c..6fd87d85f 100644 --- a/src/common/repository/sqlite/StellaDb.cxx +++ b/src/common/repository/sqlite/StellaDb.cxx @@ -31,6 +31,12 @@ namespace { constexpr Int32 CURRENT_VERSION = 1; + + #ifdef BSPF_WINDOWS + constexpr char LEGACY_SETTINGS_FILE[] = "stella.ini"; + #else + constexpr char LEGACY_SETTINGS_FILE[] = "stellarc"; + #endif } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -84,7 +90,7 @@ const string StellaDb::databaseFileName() const void StellaDb::initializeDb() const { FilesystemNode legacyConfigFile{myDatabaseDirectory}; - legacyConfigFile /= "stellarc"; + legacyConfigFile /= LEGACY_SETTINGS_FILE; FilesystemNode legacyConfigDatabase{myDatabaseDirectory}; legacyConfigDatabase /= "settings.sqlite3";