From ccacce39c39d16977ab6c1592fcb6e941b05ddff Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 26 Sep 2021 00:09:04 +0200 Subject: Add config location versioning (#2090). --- src/tools/dcpomatic.cc | 2 +- src/tools/dcpomatic_disk.cc | 2 +- src/tools/dcpomatic_disk_writer.cc | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/tools') diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index ca45963f4..0b7f632e1 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -933,7 +933,7 @@ private: _("You are making a DKDM which is encrypted by a private key held in" "\n\n%s\n\nIt is VITALLY IMPORTANT " "that you BACK UP THIS FILE since if it is lost " - "your DKDMs (and the DCPs they protect) will become useless."), std_to_wx(Config::config_file().string()).data() + "your DKDMs (and the DCPs they protect) will become useless."), std_to_wx(Config::config_read_file().string()).data() ) ); diff --git a/src/tools/dcpomatic_disk.cc b/src/tools/dcpomatic_disk.cc index 7e43c0684..ec5d8e782 100644 --- a/src/tools/dcpomatic_disk.cc +++ b/src/tools/dcpomatic_disk.cc @@ -139,7 +139,7 @@ public: /* XXX: this is a hack, but I expect we'll need logs and I'm not sure if there's * a better place to put them. */ - dcpomatic_log.reset(new FileLog(config_path() / "disk.log")); + dcpomatic_log = make_shared(State::write_path("disk.log")); dcpomatic_log->set_types (dcpomatic_log->types() | LogEntry::TYPE_DISK); LOG_DISK("dcpomatic_disk %1 started", dcpomatic_git_commit); diff --git a/src/tools/dcpomatic_disk_writer.cc b/src/tools/dcpomatic_disk_writer.cc index c638b72eb..ef384bbba 100644 --- a/src/tools/dcpomatic_disk_writer.cc +++ b/src/tools/dcpomatic_disk_writer.cc @@ -27,7 +27,9 @@ #include "lib/exceptions.h" #include "lib/ext.h" #include "lib/file_log.h" +#include "lib/state.h" #include "lib/nanomsg.h" +#include "lib/util.h" #include "lib/version.h" #include "lib/warnings.h" @@ -288,7 +290,7 @@ main () /* XXX: this is a hack, but I expect we'll need logs and I'm not sure if there's * a better place to put them. */ - dcpomatic_log.reset(new FileLog(config_path() / "disk_writer.log", LogEntry::TYPE_DISK)); + dcpomatic_log.reset(new FileLog(State::write_path("disk_writer.log"), LogEntry::TYPE_DISK)); LOG_DISK_NC("dcpomatic_disk_writer started"); #endif -- cgit v1.2.3