From 0dc9c068e7484efe691e39268df2460cbf25db8f Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 25 Jul 2018 18:21:19 +0200 Subject: Don't allow invalid export Locations (when using the GUI) --- libs/ardour/export_profile_manager.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libs/ardour/export_profile_manager.cc') diff --git a/libs/ardour/export_profile_manager.cc b/libs/ardour/export_profile_manager.cc index 56bc0bfa36..f99755e158 100644 --- a/libs/ardour/export_profile_manager.cc +++ b/libs/ardour/export_profile_manager.cc @@ -865,6 +865,8 @@ ExportProfileManager::get_warnings () /*** Check files ***/ + bool folder_ok = true; + if (channel_config_state) { FormatStateList::const_iterator format_it; FilenameStateList::const_iterator filename_it; @@ -872,9 +874,18 @@ ExportProfileManager::get_warnings () format_it != formats.end() && filename_it != filenames.end(); ++format_it, ++filename_it) { check_config (warnings, timespan_state, channel_config_state, *format_it, *filename_it); + + if (!Glib::file_test ((*filename_it)->filename->get_folder(), Glib::FileTest (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) { + folder_ok = false; + } + } } + if (!folder_ok) { + warnings->errors.push_back (_("Destination folder does not exist.")); + } + return warnings; } -- cgit v1.2.3