diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-06-01 01:23:55 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-06-01 01:23:55 +0300 |
commit | 8f0390dfa6d66ed322f6d4ad2306353c1669bfac (patch) | |
tree | db16403455af80a60a8fab8e13433a4445f51c33 /libbutl | |
parent | 22dcb13424c3a098e2f87716a9ca6e72f610f845 (diff) |
Remove redundant assertion in path_match(path, path, dir_path)
Diffstat (limited to 'libbutl')
-rw-r--r-- | libbutl/filesystem.cxx | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/libbutl/filesystem.cxx b/libbutl/filesystem.cxx index 1ea4cf8..0e1cda5 100644 --- a/libbutl/filesystem.cxx +++ b/libbutl/filesystem.cxx @@ -2126,21 +2126,13 @@ namespace butl auto match = [&entry, &r] (path&& p, const std::string&, bool interim) { - if (p == entry) + // If we found the entry (possibly through one of the recursive + // components) no need to search further. + // + if (p == entry && !interim) { - // If we found the entry (possibly through one of the recursive - // components) no need to search further. - // - if (!interim) - { - r = true; - return false; - } - else - // For self-matching the callback is first called in the interim - // mode (through the preopen function) with an empty path. - // - assert (p.empty ()); + r = true; + return false; } return true; |