13
0

more misc. startup/session load fixes

git-svn-id: svn://localhost/ardour2/branches/3.0@5001 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2009-04-23 19:41:14 +00:00
parent 41d3f3519c
commit 6d52370558

View File

@ -2245,9 +2245,19 @@ ARDOUR_UI::get_session_parameters (bool should_be_new)
if (!should_be_new && !ARDOUR_COMMAND_LINE::session_name.empty()) {
session_path = Glib::path_get_dirname (ARDOUR_COMMAND_LINE::session_name);
/* if they named a specific statefile, use it, otherwise they are
just giving a session folder, and we want to use it as is
to find the session.
*/
if (ARDOUR_COMMAND_LINE::session_name.find (statefile_suffix) != string::npos) {
session_path = Glib::path_get_dirname (ARDOUR_COMMAND_LINE::session_name);
} else {
session_path = ARDOUR_COMMAND_LINE::session_name;
}
session_name = Glib::path_get_basename (ARDOUR_COMMAND_LINE::session_name);
} else {
run_startup (should_be_new);