From 9b3d0ddd11498cb0a733ac6ba1cbd288a9929c4e Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 10 Feb 2022 22:04:40 +0100 Subject: [PATCH] Fix incorrect check for existing directory Glib::file_test returns true if **any** of the tests in the bitfield test are true (not *all*). --- gtk2_ardour/trigger_clip_picker.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk2_ardour/trigger_clip_picker.cc b/gtk2_ardour/trigger_clip_picker.cc index 31834ee97d..647adca374 100644 --- a/gtk2_ardour/trigger_clip_picker.cc +++ b/gtk2_ardour/trigger_clip_picker.cc @@ -598,7 +598,7 @@ TriggerClipPicker::drag_data_received (Glib::RefPtr const& con std::vector a = PBD::parse_path (Config->get_sample_lib_path ()); if (ARDOUR_UI_UTILS::convert_drop_to_paths (paths, data)) { for (std::vector::const_iterator s = paths.begin (); s != paths.end (); ++s) { - if (Glib::file_test (*s, Glib::FILE_TEST_IS_DIR | Glib::FILE_TEST_EXISTS)) { + if (Glib::file_test (*s, Glib::FILE_TEST_IS_DIR)) { if (std::find (a.begin(), a.end(), *s) == a.end()) { a.push_back (*s); changed = true;