fix the ** pattern not including itself's dir when used in dir position

master
Daniel Kolesa 2017-06-11 18:43:04 +02:00
parent 511ea88161
commit cca5952f93
1 changed files with 4 additions and 0 deletions

View File

@ -279,6 +279,10 @@ namespace detail {
return;
}
filesystem::recursive_directory_iterator it{ip};
/* include "current" dir in the match */
if (beg != end) {
glob_match_impl(out, beg, end, pre);
}
for (auto &de: it) {
/* followed by more path, only consider dirs */
auto dp = de.path();