From 0e72dd523557b84a3b37988d23d99eae1d79a657 Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:56:42 +0000 Subject: Double slash bug Author: jgg Date: 2001-02-23 06:41:55 GMT Double slash bug --- apt-pkg/deb/debindexfile.cc | 12 ++---------- apt-pkg/srcrecords.cc | 4 ++-- apt-pkg/tagfile.cc | 11 ++++++++++- debian/changelog | 1 + 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index 67afc89e6..dcc916c1a 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: debindexfile.cc,v 1.2 2001/02/20 07:03:17 jgg Exp $ +// $Id: debindexfile.cc,v 1.3 2001/02/23 06:41:55 jgg Exp $ /* ###################################################################### Debian Specific sources.list types and the three sorts of Debian @@ -66,15 +66,7 @@ string debSourcesIndex::SourceInfo(pkgSrcRecords::Parser const &Record, /* */ pkgSrcRecords::Parser *debSourcesIndex::CreateSrcParser() const { - string SourcesURI; - if (Dist[Dist.size() - 1] == '/') - SourcesURI = URI + Dist; - else - SourcesURI = URI + "dists/" + Dist + '/' + Section + - "/source/"; - - SourcesURI += "Sources"; - SourcesURI = URItoFileName(SourcesURI); + string SourcesURI = URItoFileName(IndexURI("Sources")); return new debSrcRecordParser(_config->FindDir("Dir::State::lists") + SourcesURI,this); } diff --git a/apt-pkg/srcrecords.cc b/apt-pkg/srcrecords.cc index b9df32e92..f8133802e 100644 --- a/apt-pkg/srcrecords.cc +++ b/apt-pkg/srcrecords.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: srcrecords.cc,v 1.4 2001/02/20 07:03:17 jgg Exp $ +// $Id: srcrecords.cc,v 1.5 2001/02/23 06:41:55 jgg Exp $ /* ###################################################################### Source Package Records - Allows access to source package records @@ -42,7 +42,7 @@ pkgSrcRecords::pkgSrcRecords(pkgSourceList &List) : Files(0), Current(0) } Files[Count] = 0; - // Doesnt work without any source index files + // Doesn't work without any source index files if (Count == 0) { _error->Error(_("Sorry, you must put some 'source' URIs" diff --git a/apt-pkg/tagfile.cc b/apt-pkg/tagfile.cc index 5d1144629..b480704a3 100644 --- a/apt-pkg/tagfile.cc +++ b/apt-pkg/tagfile.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: tagfile.cc,v 1.26 2001/02/20 07:03:17 jgg Exp $ +// $Id: tagfile.cc,v 1.27 2001/02/23 06:41:55 jgg Exp $ /* ###################################################################### Fast scanner for RFC-822 type header information @@ -30,6 +30,15 @@ /* */ pkgTagFile::pkgTagFile(FileFd *pFd,unsigned long Size) : Fd(*pFd), Size(Size) { + if (Fd.IsOpen() == false) + { + Buffer = 0; + Start = End = Buffer = 0; + Left = 0; + iOffset = 0; + return; + } + Buffer = new char[Size]; Start = End = Buffer; Left = Fd.Size(); diff --git a/debian/changelog b/debian/changelog index ec61fb5e6..0e3286b77 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ apt (0.5.1) unstable; urgency=low * Process the option string right. Closes: #86921 * Alfredo's no_proxy patch * Documentation fixes. Closes: #87091 + * JoeyH's double slash bug -- Jason Gunthorpe Thu, 22 Feb 2001 00:39:15 -0500 -- cgit v1.2.3