From 49531f69ed251f0caf030e19afbf6a0fd1868aa6 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 1 Dec 2018 19:35:43 +0300 Subject: Change path_search() to only match directory absent components in 'match absent' mode --- libbutl/filesystem.mxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libbutl/filesystem.mxx') 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, -- cgit v1.1