aboutsummaryrefslogtreecommitdiff
path: root/libbutl/filesystem.mxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-12-01 19:35:43 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-12-01 22:30:21 +0300
commit49531f69ed251f0caf030e19afbf6a0fd1868aa6 (patch)
treeaae14a5edc1772d30f75aa21de131eb7d7f15ce1 /libbutl/filesystem.mxx
parentabfee51c362cb1ed2e8eb62fec12b3eb5ca03fb0 (diff)
Change path_search() to only match directory absent components in 'match absent' mode
Diffstat (limited to 'libbutl/filesystem.mxx')
-rw-r--r--libbutl/filesystem.mxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/libbutl/filesystem.mxx b/libbutl/filesystem.mxx
index f05e569..cf041c2 100644
--- a/libbutl/filesystem.mxx
+++ b/libbutl/filesystem.mxx
@@ -714,8 +714,12 @@ LIBBUTL_MODEXPORT namespace butl
// set, the `a/*/b` pattern matches not only `a/x/b` path, but also `a/b`.
//
// Note that this does not apply to single-component patterns and the
- // pattern type is always preserved. In particular, the `a/b/*` pattern
- // matches `a/b` but not `a/b/`.
+ // pattern type is always preserved. In particular, the `a/*/` pattern
+ // matches `a/` but not `a`.
+ //
+ // Finally, keep in mind that only absent directory components can be
+ // matched this way. In particular, pattern `a*/*` does not match `ab`
+ // (but `a*/*/` matches `ab/`).
//
match_absent = 0x2,