13
0

session-dir/interchange: ignore hidden directories.

This commit is contained in:
Robin Gareus 2015-12-05 16:07:45 +01:00
parent 68d3b45976
commit a2b7a8ccab

View File

@ -91,6 +91,8 @@ SessionDirectory::old_sound_path () const
return Glib::build_filename (m_root_path, old_sound_dir_name);
}
static bool leading_dot (const std::string& value) { return value.at(0) == '.'; }
const std::string
SessionDirectory::sources_root () const
{
@ -142,6 +144,9 @@ SessionDirectory::sources_root () const
std::list<std::string> entries (dir.begin(), dir.end());
// filter out dirs starting with a dot. e.g ".DS_Store"
entries.remove_if (leading_dot);
if (entries.size() == 1) {
if (entries.front() != legalized_root) {
PBD::info << _("session-dir and session-name mismatch. Please use 'Menu > Session > Rename' in the future to rename sessions.") << endmsg;