diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:54:43 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:54:43 +0000 |
commit | d61012232a583a2b91ca6d94defd494ea158ad19 (patch) | |
tree | 8da73cb4a4e6e351cbc01025d13853b6326d12e2 /apt-pkg | |
parent | 9972233dc1653084ff7c82986cc667cf6877c4ea (diff) | |
download | apt-d61012232a583a2b91ca6d94defd494ea158ad19.tar.gz |
Fixed double slash bug
Author: jgg
Date: 1999-09-09 06:15:51 GMT
Fixed double slash bug
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/sourcelist.cc | 32 |
1 files changed, 25 insertions, 7 deletions
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; |