mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-24 14:17:21 +01:00
Unset last-capture sources when saving session
This prevents accidental deletes of files saved to disk after the fact. e.g. * save, delete last capture, quit w/o save. * save, switch-snapshot, delete last capture.
This commit is contained in:
parent
622c27ed74
commit
6535d7ed97
2 changed files with 7 additions and 1 deletions
|
|
@ -4866,7 +4866,6 @@ Session::reset_last_capture_sources ()
|
|||
continue;
|
||||
}
|
||||
tr->reset_last_capture_sources ();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -774,6 +774,13 @@ Session::save_state (string snapshot_name, bool pending, bool switch_to_snapshot
|
|||
XMLTree tree;
|
||||
std::string xml_path(_session_dir->root_path());
|
||||
|
||||
if (!pending) {
|
||||
/* Prevent destructive edits after explicit save or snapshot changes.
|
||||
* Otherwise this one can delete sources used by other snapshot
|
||||
*/
|
||||
reset_last_capture_sources ();
|
||||
}
|
||||
|
||||
/* prevent concurrent saves from different threads */
|
||||
|
||||
Glib::Threads::Mutex::Lock lm (save_state_lock);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue