summaryrefslogtreecommitdiff
path: root/libs/ardour/globals.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-04-02 19:02:42 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-04-02 19:03:06 -0400
commit84c1bbb4c7a3eb09638e4cd2e676fe885a0b209e (patch)
treef954fe8c0c846b7a47d2e41d3d9ce4e3c2dc2e74 /libs/ardour/globals.cc
parenta842a69c16f9d2ce8e41c77b727b8252e4d7a5fe (diff)
when copying A3 config files, consider that the user may have /config rather than /ardour.rc.
This will be true if they have been self-building from git or using nightlies.
Diffstat (limited to 'libs/ardour/globals.cc')
-rw-r--r--libs/ardour/globals.cc15
1 files changed, 13 insertions, 2 deletions
diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc
index 6e16d5480f..288e69dc9e 100644
--- a/libs/ardour/globals.cc
+++ b/libs/ardour/globals.cc
@@ -270,9 +270,20 @@ copy_configuration_files (string const & old_dir, string const & new_dir, int ol
copy_file (old_name, new_name);
- /* can only copy ardour.rc - UI config is not compatible */
+ /* can only copy ardour.rc/config - UI config is not compatible */
+
+ /* users who have been using git/nightlies since the last
+ * release of 3.5 will have $CONFIG/config rather than
+ * $CONFIG/ardour.rc. Pick up the newer "old" config file,
+ * to avoid confusion.
+ */
+
+ string old_name = Glib::build_filename (old_dir, X_("config"));
+
+ if (!Glib::file_test (old_name, Glib::FILE_TEST_EXISTS)) {
+ old_name = Glib::build_filename (old_dir, X_("ardour.rc"));
+ }
- old_name = Glib::build_filename (old_dir, X_("ardour.rc"));
new_name = Glib::build_filename (new_dir, X_("config"));
copy_file (old_name, new_name);