aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers/mercurial.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libfetchers/mercurial.cc')
-rw-r--r--src/libfetchers/mercurial.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libfetchers/mercurial.cc b/src/libfetchers/mercurial.cc
index 51fd1ed42..a70403660 100644
--- a/src/libfetchers/mercurial.cc
+++ b/src/libfetchers/mercurial.cc
@@ -181,7 +181,7 @@ struct MercurialInputScheme : InputScheme
Path actualPath(absPath(actualUrl));
PathFilter filter = [&](const Path & p) -> bool {
- assert(hasPrefix(p, actualPath));
+ assert(p.starts_with(actualPath));
std::string file(p, actualPath.size() + 1);
auto st = lstat(p);
@@ -189,7 +189,7 @@ struct MercurialInputScheme : InputScheme
if (S_ISDIR(st.st_mode)) {
auto prefix = file + "/";
auto i = files.lower_bound(prefix);
- return i != files.end() && hasPrefix(*i, prefix);
+ return i != files.end() && (*i).starts_with(prefix);
}
return files.count(file);