13
0

Fix incorrect check for existing directory

Glib::file_test returns true if **any** of the tests in the
bitfield test are true (not *all*).
This commit is contained in:
Robin Gareus 2022-02-10 22:04:40 +01:00
parent ff56cd61b3
commit 9b3d0ddd11
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -598,7 +598,7 @@ TriggerClipPicker::drag_data_received (Glib::RefPtr<Gdk::DragContext> const& con
std::vector<std::string> a = PBD::parse_path (Config->get_sample_lib_path ());
if (ARDOUR_UI_UTILS::convert_drop_to_paths (paths, data)) {
for (std::vector<std::string>::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;