summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-08-16 01:54:21 +0200
committerRobin Gareus <robin@gareus.org>2019-08-16 01:54:21 +0200
commit6dc8f5ed1d205c46fa382536766a78569d92e918 (patch)
tree7989a220e03a1a5848f1f42f1bbc57b5f2c97c04
parentc89e58046a09b4d8643dac0a0a6f3257c6b465bb (diff)
Fix periodic backup saves
Retain ".pending" files until explicit save or session destruction. Previously every transport-stop deleted them :(
-rw-r--r--libs/ardour/session.cc4
-rw-r--r--libs/ardour/session_state.cc5
-rw-r--r--libs/ardour/session_transport.cc4
3 files changed, 4 insertions, 9 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 71468c2a10..d61a53cd52 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -2088,10 +2088,6 @@ Session::disable_record (bool rt_context, bool force)
}
RecordStateChanged (); /* emit signal */
-
- if (!rt_context) {
- remove_pending_capture_state ();
- }
}
}
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
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index 591aa8683c..de87fea4eb 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -1724,10 +1724,6 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
}
}
- /* always try to get rid of this */
-
- remove_pending_capture_state ();
-
/* save the current state of things if appropriate */
if (did_record && !saved) {