fix renaming renamed session.
This commit is contained in:
parent
5694509bdf
commit
4b485332ce
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user