session rename details:

* don’t allow to rename read-only sessions
* prevent periodic save (while rename is in progress)
* no renaming while actively recording (peak files
  among other things will mess things up)
This commit is contained in:
Robin Gareus
2015-04-05 16:02:07 +02:00
parent 4b485332ce
commit f0231766d7

View File

@@ -3624,6 +3624,17 @@ Session::rename (const std::string& new_name)
string const old_sources_root = _session_dir->sources_root();
if (!_writable || (_state_of_the_state & CannotSave)) {
error << _("Cannot rename read-only session.") << endmsg;
return 0; // don't show "messed up" warning
}
if (record_status() == Recording) {
error << _("Cannot rename session while recording") << endmsg;
return 0; // don't show "messed up" warning
}
StateProtector stp (this);
/* Rename:
* session directory