diff options
author | Robin Gareus <robin@gareus.org> | 2018-07-25 18:21:19 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2018-07-25 18:21:19 +0200 |
commit | 0dc9c068e7484efe691e39268df2460cbf25db8f (patch) | |
tree | 5379aa04f17e1c5b6a64d768256a216c9449b343 /libs/ardour/export_profile_manager.cc | |
parent | ed1c6e08630f0fe37849b27f5ed2d3ce62eeaa8c (diff) |
Don't allow invalid export Locations (when using the GUI)
Diffstat (limited to 'libs/ardour/export_profile_manager.cc')
-rw-r--r-- | libs/ardour/export_profile_manager.cc | 11 |
1 files changed, 11 insertions, 0 deletions
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; } |