summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/debmetaindex.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/deb/debmetaindex.cc')
-rw-r--r--apt-pkg/deb/debmetaindex.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc
index a72f6d055..f24a5e79e 100644
--- a/apt-pkg/deb/debmetaindex.cc
+++ b/apt-pkg/deb/debmetaindex.cc
@@ -142,10 +142,10 @@ static std::string constructMetaIndexURI(std::string URI, std::string const &Dis
if (Dist == "/")
;
else if (Dist[Dist.size()-1] == '/')
- URI += Dist;
+ URI += pkgAcquire::URIEncode(Dist);
else
- URI += "dists/" + Dist + "/";
- return URI + Type;
+ URI += "dists/" + pkgAcquire::URIEncode(Dist) + "/";
+ return URI + pkgAcquire::URIEncode(Type);
}
std::string debReleaseIndex::MetaIndexURI(const char *Type) const
{
@@ -420,6 +420,13 @@ void debReleaseIndex::AddComponent(std::string const &sourcesEntry, /*{{{*/
d->DebEntries.push_back(entry);
}
/*}}}*/
+std::string debReleaseIndex::ArchiveURI(std::string const &File) const /*{{{*/
+{
+ if (File.empty())
+ return URI;
+ return URI + pkgAcquire::URIEncode(File);
+}
+ /*}}}*/
bool debReleaseIndex::Load(std::string const &Filename, std::string * const ErrorText)/*{{{*/
{