Copy state files for backup, instead of serializing
This should speed up backup saves of large session files.
This commit is contained in:
parent
5ae0039e5b
commit
0b89d69de1
@ -925,10 +925,11 @@ Session::save_state (string snapshot_name, bool pending, bool switch_to_snapshot
|
||||
save_path += "-";
|
||||
save_path += timebuf;
|
||||
save_path += statefile_suffix;
|
||||
if ( !tree.write (save_path) )
|
||||
if (!copy_file (xml_path, save_path)) {
|
||||
error << string_compose(_("Could not save backup file at path \"%1\" (%2)"),
|
||||
save_path, g_strerror (errno)) << endmsg;
|
||||
}
|
||||
}
|
||||
|
||||
StateSaved (snapshot_name); /* EMIT SIGNAL */
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user