13
0

fix incorrect logic when loading session via NextStep document API

This commit is contained in:
Paul Davis 2015-01-25 12:53:48 -05:00
parent bd3643a597
commit 78ec211733

View File

@ -2643,7 +2643,8 @@ ARDOUR_UI::build_session_from_dialog (SessionDialog& sd, const std::string& sess
void void
ARDOUR_UI::idle_load (const std::string& path) ARDOUR_UI::idle_load (const std::string& path)
{ {
if (_session) { ARDOUR_COMMAND_LINE::session_name = path;
if (Glib::file_test (path, Glib::FILE_TEST_IS_DIR)) { if (Glib::file_test (path, Glib::FILE_TEST_IS_DIR)) {
/* /path/to/foo => /path/to/foo, foo */ /* /path/to/foo => /path/to/foo, foo */
load_session (path, basename_nosuffix (path)); load_session (path, basename_nosuffix (path));
@ -2651,10 +2652,6 @@ ARDOUR_UI::idle_load (const std::string& path)
/* /path/to/foo/foo.ardour => /path/to/foo, foo */ /* /path/to/foo/foo.ardour => /path/to/foo, foo */
load_session (Glib::path_get_dirname (path), basename_nosuffix (path)); load_session (Glib::path_get_dirname (path), basename_nosuffix (path));
} }
} else {
ARDOUR_COMMAND_LINE::session_name = path;
}
} }
/** @param quit_on_cancel true if exit() should be called if the user clicks `cancel' in the new session dialog */ /** @param quit_on_cancel true if exit() should be called if the user clicks `cancel' in the new session dialog */