summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2007-09-04 09:01:09 +0000
committerTim Mayberry <mojofunk@gmail.com>2007-09-04 09:01:09 +0000
commit54b17ddfd7b1eb886545af0624c19df329ae32df (patch)
treeed833b99f6d5da6d84990b5cf32de904a2357487 /libs
parenta36eccbfcc66bd3e412a742ebc7e19aff8bada8f (diff)
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
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/session_state.cc5
1 files changed, 5 insertions, 0 deletions
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;