summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-05-09 00:48:07 +0200
committerCarl Hetherington <cth@carlh.net>2025-05-29 11:49:34 +0200
commit4021e2a5b467338814664c466a84714da5fcbc0b (patch)
tree7902f5300ffc2673fd6ba5d30e9c402a1ea347a9 /src
parent6cc78916f19b813cef89ef7028b7c4de6bb94c1f (diff)
Interpret relative cinemas SQLite3 paths as being relative to the config.xml (#3038).
Diffstat (limited to 'src')
-rw-r--r--src/lib/config.cc11
-rw-r--r--src/lib/config.h4
2 files changed, 12 insertions, 3 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc
index 669ea4e21..66a0e1a5a 100644
--- a/src/lib/config.cc
+++ b/src/lib/config.cc
@@ -1736,6 +1736,17 @@ Config::cinemas_file_from_zip(boost::filesystem::path zip)
}
+boost::filesystem::path
+Config::cinemas_file() const
+{
+ if (_cinemas_file.is_absolute()) {
+ return _cinemas_file;
+ }
+
+ return read_path("config.xml").parent_path() / _cinemas_file;
+}
+
+
#ifdef DCPOMATIC_GROK
Config::Grok::Grok()
diff --git a/src/lib/config.h b/src/lib/config.h
index b2a979ffa..c90790ebc 100644
--- a/src/lib/config.h
+++ b/src/lib/config.h
@@ -396,9 +396,7 @@ public:
return _dkdms;
}
- boost::filesystem::path cinemas_file() const {
- return _cinemas_file;
- }
+ boost::filesystem::path cinemas_file() const;
boost::filesystem::path dkdm_recipients_file() const {
return _dkdm_recipients_file;