Fix periodic backup saves

Retain ".pending" files until explicit save or session destruction.
Previously every transport-stop deleted them :(
This commit is contained in:
Robin Gareus
2019-08-16 01:54:21 +02:00
parent c89e58046a
commit 6dc8f5ed1d
3 changed files with 4 additions and 9 deletions

View File

@@ -2088,10 +2088,6 @@ Session::disable_record (bool rt_context, bool force)
}
RecordStateChanged (); /* emit signal */
if (!rt_context) {
remove_pending_capture_state ();
}
}
}

View File

@@ -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

View File

@@ -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) {