summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-04-05 16:01:08 +0200
committerRobin Gareus <robin@gareus.org>2015-04-05 16:01:08 +0200
commit4b485332ceaefcea8b803e7342e2a7dba700026e (patch)
tree91e8a609c9236380eb695d68674ab1f1278144a2
parent5694509bdf66c845a9d1746fea51e1d0722a4982 (diff)
fix renaming renamed session.
-rw-r--r--libs/ardour/session_state.cc11
1 files changed, 10 insertions, 1 deletions
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<space_and_path> new_session_dirs;
+
for (vector<space_and_path>::const_iterator i = session_dirs.begin(); i != session_dirs.end(); ++i) {
vector<string> 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<space_and_path>::const_iterator i = session_dirs.begin(); i != session_dirs.end(); ++i) {
vector<string> 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;