From 6dc8f5ed1d205c46fa382536766a78569d92e918 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 16 Aug 2019 01:54:21 +0200 Subject: Fix periodic backup saves Retain ".pending" files until explicit save or session destruction. Previously every transport-stop deleted them :( --- libs/ardour/session_state.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libs/ardour/session_state.cc') diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index a1c9e70fe1..1488c983e5 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -449,7 +449,6 @@ Session::session_loaded () save_state (""); } else if (state_was_pending) { save_state (""); - remove_pending_capture_state (); state_was_pending = false; } @@ -818,6 +817,10 @@ Session::save_state (string snapshot_name, bool pending, bool switch_to_snapshot fork_state = switch_to_snapshot ? SwitchToSnapshot : SnapshotKeep; } + if (!pending && !for_archive && ! template_only) { + remove_pending_capture_state (); + } + #ifndef NDEBUG const int64_t save_start_time = g_get_monotonic_time(); #endif -- cgit v1.2.3