aboutsummaryrefslogtreecommitdiff
path: root/src/libfetchers/tarball.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libfetchers/tarball.cc')
-rw-r--r--src/libfetchers/tarball.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libfetchers/tarball.cc b/src/libfetchers/tarball.cc
index e3a41e75e..68cb0ca40 100644
--- a/src/libfetchers/tarball.cc
+++ b/src/libfetchers/tarball.cc
@@ -188,10 +188,10 @@ struct CurlInputScheme : InputScheme
const bool hasTarballExtension(std::string_view path) const
{
- return hasSuffix(path, ".zip") || hasSuffix(path, ".tar")
- || hasSuffix(path, ".tgz") || hasSuffix(path, ".tar.gz")
- || hasSuffix(path, ".tar.xz") || hasSuffix(path, ".tar.bz2")
- || hasSuffix(path, ".tar.zst");
+ return path.ends_with(".zip") || path.ends_with(".tar")
+ || path.ends_with(".tgz") || path.ends_with(".tar.gz")
+ || path.ends_with(".tar.xz") || path.ends_with(".tar.bz2")
+ || path.ends_with(".tar.zst");
}
virtual bool isValidURL(const ParsedURL & url, bool requireTree) const = 0;