aboutsummaryrefslogtreecommitdiff
path: root/src/nix/prefetch.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/prefetch.cc')
-rw-r--r--src/nix/prefetch.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix/prefetch.cc b/src/nix/prefetch.cc
index 9f2d6cc57..0104635fb 100644
--- a/src/nix/prefetch.cc
+++ b/src/nix/prefetch.cc
@@ -42,7 +42,7 @@ std::string resolveMirrorUrl(EvalState & state, const std::string & url)
throw Error("mirror URL '%s' did not expand to anything", url);
std::string mirror(state.forceString(*mirrorList->value->listElems()[0], noPos, "while evaluating the first available mirror"));
- return mirror + (hasSuffix(mirror, "/") ? "" : "/") + s.substr(p + 1);
+ return mirror + (mirror.ends_with("/") ? "" : "/") + s.substr(p + 1);
}
std::tuple<StorePath, Hash> prefetchFile(