Strip .ardour prefix from session files selected from the startup dialogue. May...
authorCarl Hetherington <carl@carlh.net>
Wed, 28 Sep 2011 01:27:54 +0000 (01:27 +0000)
committerCarl Hetherington <carl@carlh.net>
Wed, 28 Sep 2011 01:27:54 +0000 (01:27 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@10153 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/ardour_ui.cc
libs/ardour/session.cc
libs/ardour/session_state.cc

index c4c90a261f52564e4dd7762690e071265d1a5b80..a5dafd6757a5e9cb3dba9ab5ce15bac02992386f 100644 (file)
@@ -2567,6 +2567,12 @@ ARDOUR_UI::get_session_parameters (bool quit_on_cancel, bool should_be_new, stri
 
                        session_name = _startup->session_name (likely_new);
 
+                       string::size_type suffix = session_name.find (statefile_suffix);
+
+                       if (suffix != string::npos) {
+                               session_name = session_name.substr (0, suffix);
+                       }
+
                        /* this shouldn't happen, but we catch it just in case it does */
 
                        if (session_name.empty()) {
index 67daaae2f4800778f6ef3bce9b8254ec1b0a425d..5b1dd3894f2a0669d17e9a1d09d8a807075b825f 100644 (file)
@@ -132,6 +132,7 @@ PBD::Signal0<void> Session::Quit;
 static void clean_up_session_event (SessionEvent* ev) { delete ev; }
 const SessionEvent::RTeventCallback Session::rt_cleanup (clean_up_session_event);
 
+/** @param snapshot_name Snapshot name, without .ardour prefix */
 Session::Session (AudioEngine &eng,
                   const string& fullpath,
                   const string& snapshot_name,
index 95c59fd5e686619c2ec063d2211f6082302c4753..7084b81f05b529b44219d8304a53b6bffb81bc10 100644 (file)
@@ -134,7 +134,7 @@ using namespace std;
 using namespace ARDOUR;
 using namespace PBD;
 
-
+/** @param snapshot_name Snapshot name, without the .ardour prefix */
 void
 Session::first_stage_init (string fullpath, string snapshot_name)
 {