_state_of_the_state = Clean;
if (save_state (_current_snapshot_name)) {
- save_history();
+ save_history (_current_snapshot_name);
return -1;
}
}
if (state_was_pending) {
save_state (_current_snapshot_name);
- save_history();
+ save_history (_current_snapshot_name);
remove_pending_capture_state ();
state_was_pending = false;
}
Session::auto_save()
{
save_state (_current_snapshot_name);
- save_history();
+ save_history (_current_snapshot_name);
}
RouteGroup *
*/
save_state ("");
+ save_history ("");
out:
_state_of_the_state = (StateOfTheState) (_state_of_the_state & ~InCleanup);
int
-Session::save_history ()
+Session::save_history (string snapshot_name)
{
XMLTree tree;
string xml_path;
tree.set_root (&history.get_state());
- xml_path = _path + _current_snapshot_name + ".history";
+ if (snapshot_name.empty()) {
+ snapshot_name = _current_snapshot_name;
+ }
+
+ xml_path = _path + snapshot_name + ".history";
bak_path = xml_path + ".bak";