summaryrefslogtreecommitdiff
path: root/gtk2_ardour/startup.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gtk2_ardour/startup.cc')
-rw-r--r--gtk2_ardour/startup.cc22
1 files changed, 16 insertions, 6 deletions
diff --git a/gtk2_ardour/startup.cc b/gtk2_ardour/startup.cc
index b6af6ddb4c..d4c8686698 100644
--- a/gtk2_ardour/startup.cc
+++ b/gtk2_ardour/startup.cc
@@ -115,13 +115,23 @@ ArdourStartup::~ArdourStartup ()
bool
ArdourStartup::required ()
{
- return !Glib::file_test (been_here_before_path(), Glib::FILE_TEST_EXISTS);
-}
+ /* look for a "been here before" file for this version or earlier
+ * versions
+ */
-std::string
-ArdourStartup::been_here_before_path ()
-{
- return Glib::build_filename (user_config_directory (), ".a" PROGRAM_VERSION);
+ const int current_version = atoi (PROGRAM_VERSION);
+
+ for (int v = current_version; v != 0; --v) {
+ if (Glib::file_test (ARDOUR::been_here_before_path (v), Glib::FILE_TEST_EXISTS)) {
+ if (v != current_version) {
+ /* older version exists, create the current one */
+ ofstream fout (been_here_before_path (current_version).c_str());
+ }
+ return false;
+ }
+ }
+
+ return true;
}
void