summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2021-10-18 13:37:09 +0000
committerJulian Andres Klode <jak@debian.org>2021-10-18 13:37:09 +0000
commit76bd0ab589f5a577bd6127bf6487fd351de5b32a (patch)
treea1d191fcb07118428a09e92bd29827e3af622bf6 /apt-pkg
parentf6b08c78dcdda1734710a5ef01553f53ceb5c52e (diff)
parent4e04cbafe7db326b52ee650a4f4ccc3444da6890 (diff)
Merge branch 'fix/file-https-proxy' into 'main'
Fix file:/// vs file:/ hang & https-proxy for http See merge request apt-team/apt!187
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/sourcelist.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc
index cd7dbce9c..0ac59fcfc 100644
--- a/apt-pkg/sourcelist.cc
+++ b/apt-pkg/sourcelist.cc
@@ -85,12 +85,12 @@ bool pkgSourceList::Type::FixupURI(string &URI) const
if (URI.find(':') == string::npos)
return false;
- URI = SubstVar(URI,"$(ARCH)",_config->Find("APT::Architecture"));
-
+ URI = ::URI{SubstVar(URI, "$(ARCH)", _config->Find("APT::Architecture"))};
+
// Make sure that the URI is / postfixed
- if (URI[URI.size() - 1] != '/')
- URI += '/';
-
+ if (URI.back() != '/')
+ URI.push_back('/');
+
return true;
}
/*}}}*/