summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-03-31 11:27:30 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-03-31 11:27:47 -0400
commit207ac16731baec44c939d85f25c8965d925d7983 (patch)
tree09ebee94d4ffa2e2a5667df1158efd0a096b4b58 /libs
parentea5e94977b3bddbc477fc4e87557f9e1d1d50790 (diff)
move "been here before" path concept into libardour, and use it appropriately at startup
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/filesystem_paths.h8
-rw-r--r--libs/ardour/filesystem_paths.cc11
2 files changed, 19 insertions, 0 deletions
diff --git a/libs/ardour/ardour/filesystem_paths.h b/libs/ardour/ardour/filesystem_paths.h
index feca4ccb37..afa66453eb 100644
--- a/libs/ardour/ardour/filesystem_paths.h
+++ b/libs/ardour/ardour/filesystem_paths.h
@@ -45,6 +45,14 @@ namespace ARDOUR {
*/
LIBARDOUR_API std::string user_cache_directory ();
+ /**
+ * @return the path used to store a persistent indication
+ * that the given version of the program has been used before.
+ *
+ * @param version is the version to check for. If unspecified,
+ * it defaults to the current (build-time) version of the program.
+ */
+ LIBARDOUR_API std::string been_here_before_path (int version = -1);
/**
* @return the path to the directory that contains the system wide ardour
diff --git a/libs/ardour/filesystem_paths.cc b/libs/ardour/filesystem_paths.cc
index 9005bd01a3..231bc84a3c 100644
--- a/libs/ardour/filesystem_paths.cc
+++ b/libs/ardour/filesystem_paths.cc
@@ -272,4 +272,15 @@ ardour_data_search_path ()
return search_path;
}
+string
+been_here_before_path (int version)
+{
+ if (version < 0) {
+ version = atoi (PROGRAM_VERSION);
+ }
+
+ return Glib::build_filename (user_config_directory (version), string (".a") + to_string (version, std::dec));
+}
+
+
} // namespace ARDOUR