From 21bdbaefbf46cc14a52dd54bb9183d4056a740f6 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Tue, 24 Jan 2006 06:01:27 +0000 Subject: [PATCH] allow templates to load via absolute path git-svn-id: svn://localhost/trunk/ardour2@294 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session_state.cc | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 09834fa27a..2a8bdf2fde 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -505,33 +505,7 @@ Session::create (bool& new_session, string* mix_template, jack_nframes_t initial if (mix_template) { if (new_session){ - - string lookfor = "^"; - lookfor += *mix_template; - lookfor += _template_suffix; - lookfor += '$'; - - PathScanner scanner; - string tpath = template_path(); - string in_path; - string out_path; - - vector* result= scanner (tpath, lookfor, false, true); - - if (result == 0) { - error << string_compose (_("Could not find a template called %1 in %2"), *mix_template, tpath) - << endmsg; - *mix_template = ""; - } - - if (result->size() == 0) { - delete result; - error << string_compose (_("Could not find a template called %1 in %2"), *mix_template, tpath) - << endmsg; - *mix_template = ""; - } - - in_path = *(result->front()); + std::string in_path = *mix_template; ifstream in(in_path.c_str());