From b65fe35f675293fb31e0b1a34cb6ac541773edc0 Mon Sep 17 00:00:00 2001 From: Torben Hohn Date: Wed, 2 Jun 2010 14:36:50 +0000 Subject: [PATCH] reenable loading of a statefile specified at commandline git-svn-id: svn://localhost/ardour2/branches/3.0@7211 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session_state.cc | 14 +++++++++----- 1 file 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;