summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorben Hohn <torbenh@gmx.de>2010-06-02 14:36:50 +0000
committerTorben Hohn <torbenh@gmx.de>2010-06-02 14:36:50 +0000
commitb65fe35f675293fb31e0b1a34cb6ac541773edc0 (patch)
treed4c96d337766700f4c573c410cfc64b34dec9c6f
parent9317a3217918b0b6f1e24231806225a385c106a8 (diff)
reenable loading of a statefile specified at commandline
git-svn-id: svn://localhost/ardour2/branches/3.0@7211 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/ardour/session_state.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 9ac0cfb329..2b3bd39b6a 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -856,13 +856,17 @@ Session::load_state (string snapshot_name)
if (!state_was_pending) {
xmlpath = _session_dir->root_path();
- xmlpath /= legalize_for_path (snapshot_name) + statefile_suffix;
+ xmlpath /= snapshot_name;
}
- if (!sys::exists (xmlpath)) {
- error << string_compose(_("%1: session state information file \"%2\" doesn't exist!"), _name, xmlpath.to_string()) << endmsg;
- return 1;
- }
+ if (!sys::exists (xmlpath)) {
+ xmlpath = _session_dir->root_path();
+ xmlpath /= legalize_for_path (snapshot_name) + statefile_suffix;
+ if (!sys::exists (xmlpath)) {
+ error << string_compose(_("%1: session state information file \"%2\" doesn't exist!"), _name, xmlpath.to_string()) << endmsg;
+ return 1;
+ }
+ }
state_tree = new XMLTree;