diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 529028e294..30018c53da 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -82,6 +82,7 @@ #include "ardour/session_utils.h" #include "ardour/slave.h" #include "ardour/system_exec.h" +#include "ardour/directory_names.h" #include "dbg_msg.h" #ifdef WINDOWS_VST_SUPPORT @@ -2830,14 +2831,107 @@ ARDOUR_UI::get_session_parameters (bool quit_on_cancel, bool should_be_new, stri if (likely_new && !nsm) { std::string existing = Glib::build_filename (session_path, session_name); + + bool do_not_create_session = false; - if (!ask_about_loading_existing_session (existing)) { - ARDOUR_COMMAND_LINE::session_name = ""; // cancel that - continue; - } - } + GDir *dir; + GError *error; + const gchar *file_name; + + dir = g_dir_open(session_path.c_str(), 0, &error); + + while ((file_name = g_dir_read_name(dir))) + { + string ff = string(file_name); + + string full_file_name = g_build_filename(session_path.c_str(), file_name); + + string str_file_name = string(file_name); + string interchange_debug = string(ARDOUR::interchange_dir_name); + + if( (g_file_test (full_file_name.c_str(), GFileTest (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) && + (str_file_name == interchange_debug) ) + { + cout<=0 ) + cout<=0 ) + cout<=0) + cout<