summaryrefslogtreecommitdiff
path: root/apt-pkg/indexfile.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/indexfile.cc')
-rw-r--r--apt-pkg/indexfile.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/apt-pkg/indexfile.cc b/apt-pkg/indexfile.cc
index 85d0e87cd..515208525 100644
--- a/apt-pkg/indexfile.cc
+++ b/apt-pkg/indexfile.cc
@@ -203,6 +203,10 @@ pkgDebianIndexTargetFile::pkgDebianIndexTargetFile(IndexTarget const &Target, bo
/*}}}*/
std::string pkgDebianIndexTargetFile::ArchiveURI(std::string const &File) const/*{{{*/
{
+ std::string httpprefix = "http://";
+ std::string httpsprefix = "https://";
+ if (File.substr(0, httpprefix.size()) == httpprefix || File.substr(0, httpsprefix.size()) == httpsprefix)
+ return File;
return Target.Option(IndexTarget::REPO_URI) + File;
}
/*}}}*/