aboutsummaryrefslogtreecommitdiff
path: root/libbutl
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-09-28 20:45:34 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-09-28 20:45:34 +0300
commit55764e395c453b537c08c1e5cadfbb2ddd349279 (patch)
treeb9615793677bb9e00434356570fcffc547cafddb /libbutl
parent8f14a22e5bbb71d90577b35a09ba8ffae04bfe9c (diff)
Swap entry and pattern parameters in path_match()
Diffstat (limited to 'libbutl')
-rw-r--r--libbutl/filesystem.cxx8
-rw-r--r--libbutl/filesystem.mxx6
2 files changed, 7 insertions, 7 deletions
diff --git a/libbutl/filesystem.cxx b/libbutl/filesystem.cxx
index 9769124..832e1b6 100644
--- a/libbutl/filesystem.cxx
+++ b/libbutl/filesystem.cxx
@@ -1798,7 +1798,7 @@ namespace butl
}
bool
- path_match (const string& pattern, const string& name)
+ path_match (const string& name, const string& pattern)
{
// Implementation notes:
//
@@ -1993,7 +1993,7 @@ namespace butl
? pattern_dir
: filesystem.start_dir ()));
- if (!path_match (pcr, se.leaf ().representation ()))
+ if (!path_match (se.leaf ().representation (), pcr))
continue;
// If the callback function returns false, then we stop the entire search
@@ -2469,8 +2469,8 @@ namespace butl
}
bool
- path_match (const path& pattern,
- const path& entry,
+ path_match (const path& entry,
+ const path& pattern,
const dir_path& start,
path_match_flags flags)
{
diff --git a/libbutl/filesystem.mxx b/libbutl/filesystem.mxx
index 24922a1..261b985 100644
--- a/libbutl/filesystem.mxx
+++ b/libbutl/filesystem.mxx
@@ -775,7 +775,7 @@ LIBBUTL_MODEXPORT namespace butl
// directory separator).
//
LIBBUTL_SYMEXPORT bool
- path_match (const std::string& pattern, const std::string& name);
+ path_match (const std::string& name, const std::string& pattern);
// Return true if path entry matches pattern. Note that the match is
// performed literally, with no paths normalization being performed. The
@@ -786,8 +786,8 @@ LIBBUTL_MODEXPORT namespace butl
// wildcard sequences (see path_search() for details).
//
LIBBUTL_SYMEXPORT bool
- path_match (const path& pattern,
- const path& entry,
+ path_match (const path& entry,
+ const path& pattern,
const dir_path& start = dir_path (),
path_match_flags = path_match_flags::none);