projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pot/merge.
[dcpomatic.git]
/
src
/
lib
/
state.cc
diff --git
a/src/lib/state.cc
b/src/lib/state.cc
index abb1976951e9f5b62daccb8e7fe2674da17b45d1..5f7e9a701bebcb0ee9272ab79ef99457912c9952 100644
(file)
--- a/
src/lib/state.cc
+++ b/
src/lib/state.cc
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2018 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2018
-2021
Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
This file is part of DCP-o-matic.
@@
-18,15
+18,21
@@
*/
*/
+
#include "state.h"
#include "state.h"
+#include "cross.h"
#include <glib.h>
#include <glib.h>
+
using std::string;
using std::string;
+
boost::optional<boost::filesystem::path> State::override_path;
boost::optional<boost::filesystem::path> State::override_path;
+
/** @param file State filename
/** @param file State filename
- * @return Full path to write @file to */
+ * @return Full path to write @file to.
+ */
boost::filesystem::path
State::path (string file, bool create_directories)
{
boost::filesystem::path
State::path (string file, bool create_directories)
{
@@
-34,16
+40,7
@@
State::path (string file, bool create_directories)
if (override_path) {
p = *override_path;
} else {
if (override_path) {
p = *override_path;
} else {
-#ifdef DCPOMATIC_OSX
- p /= g_get_home_dir ();
- p /= "Library";
- p /= "Preferences";
- p /= "com.dcpomatic";
- p /= "2";
-#else
- p /= g_get_user_config_dir ();
- p /= "dcpomatic2";
-#endif
+ p = config_path ();
}
boost::system::error_code ec;
if (create_directories) {
}
boost::system::error_code ec;
if (create_directories) {