From 54b17ddfd7b1eb886545af0624c19df329ae32df Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Tue, 4 Sep 2007 09:01:09 +0000 Subject: Fix to avoid overwriting the backup file of a 0.99 session when opening a session This is equivalent to the fix applied as rev 2244 to the 2.0-ongoing branch git-svn-id: svn://localhost/ardour2/trunk@2402 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session_state.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libs') diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 775f3658b4..22310d6b8f 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -728,6 +728,11 @@ Session::load_state (string snapshot_name) backup_path /= snapshot_name + "-1" + statefile_suffix; + // only create a backup once + if (sys::exists (backup_path)) { + return 0; + } + info << string_compose (_("Copying old session file %1 to %2\nUse %2 with Ardour versions before 2.0 from now on"), xmlpath.to_string(), backup_path.to_string()) << endmsg; -- cgit v1.2.3