From 4b485332ceaefcea8b803e7342e2a7dba700026e Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 5 Apr 2015 16:01:08 +0200 Subject: fix renaming renamed session. --- libs/ardour/session_state.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index c72ec8b873..c514aa9861 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -3638,6 +3638,8 @@ Session::rename (const std::string& new_name) * already exist ... */ + vector new_session_dirs; + for (vector::const_iterator i = session_dirs.begin(); i != session_dirs.end(); ++i) { vector v; @@ -3660,10 +3662,15 @@ Session::rename (const std::string& new_name) if (Glib::file_test (newstr, Glib::FILE_TEST_EXISTS)) { return -1; } + + space_and_path sp; + sp.path = newstr; + sp.blocks = 0; // not needed + new_session_dirs.push_back(sp); } /* Session dirs */ - + for (vector::const_iterator i = session_dirs.begin(); i != session_dirs.end(); ++i) { vector v; @@ -3719,6 +3726,8 @@ Session::rename (const std::string& new_name) } } + session_dirs = new_session_dirs; + /* state file */ oldstr = Glib::build_filename (newpath, _current_snapshot_name) + statefile_suffix; -- cgit v1.2.3