aboutsummaryrefslogtreecommitdiff
path: root/libbutl/filesystem.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-06-01 01:23:55 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-06-01 01:23:55 +0300
commit8f0390dfa6d66ed322f6d4ad2306353c1669bfac (patch)
treedb16403455af80a60a8fab8e13433a4445f51c33 /libbutl/filesystem.cxx
parent22dcb13424c3a098e2f87716a9ca6e72f610f845 (diff)
Remove redundant assertion in path_match(path, path, dir_path)
Diffstat (limited to 'libbutl/filesystem.cxx')
-rw-r--r--libbutl/filesystem.cxx20
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;