From d61012232a583a2b91ca6d94defd494ea158ad19 Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:54:43 +0000 Subject: Fixed double slash bug Author: jgg Date: 1999-09-09 06:15:51 GMT Fixed double slash bug --- apt-pkg/sourcelist.cc | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) (limited to 'apt-pkg/sourcelist.cc') diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc index a7e6b0e6a..77f2acbc0 100644 --- a/apt-pkg/sourcelist.cc +++ b/apt-pkg/sourcelist.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: sourcelist.cc,v 1.14 1999/07/20 05:53:33 jgg Exp $ +// $Id: sourcelist.cc,v 1.15 1999/09/09 06:15:51 jgg Exp $ /* ###################################################################### List of Sources @@ -169,7 +169,10 @@ string pkgSourceList::Item::PackagesURI() const { case Deb: if (Dist[Dist.size() - 1] == '/') - Res = URI + Dist; + { + if (Dist != "/") + Res = URI + Dist; + } else Res = URI + "dists/" + Dist + '/' + Section + "/binary-" + _config->Find("APT::Architecture") + '/'; @@ -201,7 +204,10 @@ string pkgSourceList::Item::PackagesInfo() const case Deb: Res += SiteOnly(URI) + ' '; if (Dist[Dist.size() - 1] == '/') - Res += Dist; + { + if (Dist != "/") + Res += Dist; + } else Res += Dist + '/' + Section; @@ -231,7 +237,10 @@ string pkgSourceList::Item::ReleaseURI() const { case Deb: if (Dist[Dist.size() - 1] == '/') - Res = URI + Dist; + { + if (Dist != "/") + Res = URI + Dist; + } else Res = URI + "dists/" + Dist + '/' + Section + "/binary-" + _config->Find("APT::Architecture") + '/'; @@ -264,7 +273,10 @@ string pkgSourceList::Item::ReleaseInfo() const case DebSrc: Res += SiteOnly(URI) + ' '; if (Dist[Dist.size() - 1] == '/') - Res += Dist; + { + if (Dist != "/") + Res += Dist; + } else Res += Dist + '/' + Section; @@ -286,7 +298,10 @@ string pkgSourceList::Item::ArchiveInfo(pkgCache::VerIterator Ver) const case Deb: Res += SiteOnly(URI) + ' '; if (Dist[Dist.size() - 1] == '/') - Res += Dist; + { + if (Dist != "/") + Res += Dist; + } else Res += Dist + '/' + Section; @@ -328,7 +343,10 @@ string pkgSourceList::Item::SourceInfo(string Pkg,string Ver,string Comp) const case Deb: Res += SiteOnly(URI) + ' '; if (Dist[Dist.size() - 1] == '/') - Res += Dist; + { + if (Dist != "/") + Res += Dist; + } else Res += Dist + '/' + Section; -- cgit v1.2.3