diff --git a/Frameworks/regexp/src/glob.cc b/Frameworks/regexp/src/glob.cc index 413d13ed..cd55a2b0 100644 --- a/Frameworks/regexp/src/glob.cc +++ b/Frameworks/regexp/src/glob.cc @@ -47,16 +47,20 @@ namespace path // = glob_list_t = // =============== - void glob_list_t::add_include_glob (std::string const& glob, size_t itemType) + void glob_list_t::add_glob (std::string const& glob, size_t itemType) { if(glob != NULL_STR) - _globs.emplace_back(glob_t(glob, false), itemType); + _globs.emplace_back(glob_t(glob, itemType & kPathItemExclude), itemType); + } + + void glob_list_t::add_include_glob (std::string const& glob, size_t itemType) + { + add_glob(glob, itemType); } void glob_list_t::add_exclude_glob (std::string const& glob, size_t itemType) { - if(glob != NULL_STR) - _globs.emplace_back(glob_t(glob, true), itemType | kPathItemExclude); + add_glob(glob, itemType | kPathItemExclude); } bool glob_list_t::include (std::string const& path, size_t itemType, bool defaultResult) const diff --git a/Frameworks/regexp/src/glob.h b/Frameworks/regexp/src/glob.h index 88aead67..a6a079d0 100644 --- a/Frameworks/regexp/src/glob.h +++ b/Frameworks/regexp/src/glob.h @@ -33,6 +33,7 @@ namespace path add_include_glob(glob); } + void add_glob (std::string const& glob, size_t itemType = kPathItemAny); void add_include_glob (std::string const& glob, size_t itemType = kPathItemAny); void add_exclude_glob (std::string const& glob, size_t itemType = kPathItemAny);