summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-02-09 23:35:30 +0100
committerCarl Hetherington <cth@carlh.net>2025-02-09 23:35:30 +0100
commitfe36f02b81d740bedfe04c08027748735e2bf1ba (patch)
treec7be04950572888679833cc09b21a4d318b7f44f /src
parent1ce09f162354c2933eece74bb0935638a20d1cd9 (diff)
Remove believed pointless pre-storage of file state.
I think I previously misunderstood what was going on here and thought the problem was that doing set_cinemas_file() created a sqlite3 file. I now think that the problem is rather that we call Config::instance() early in dcpomatic.cc, then ::drop(). This creates the sqlite3 file, sets its path in the Config object but then deletes the object without saving it. When we create the Config object "for real" we don't reset the path from XML to sqlite3. The part of the previous fix that unconditionally sets the config path seems to be the right one.
Diffstat (limited to 'src')
-rw-r--r--src/lib/config.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc
index 4440aab4d..79584326c 100644
--- a/src/lib/config.cc
+++ b/src/lib/config.cc
@@ -700,11 +700,10 @@ Config::instance()
if (cinemas_file.extension() == ".xml") {
auto sqlite = cinemas_file;
sqlite.replace_extension(".sqlite3");
- bool const had_sqlite = dcp::filesystem::exists(sqlite);
_instance->set_cinemas_file(sqlite);
- if (dcp::filesystem::exists(cinemas_file) && !had_sqlite) {
+ if (dcp::filesystem::exists(cinemas_file) && !dcp::filesystem::exists(sqlite)) {
CinemaList cinemas;
cinemas.read_legacy_file(cinemas_file);
}