Re: Bug#40230: apt can't handle 'file' methods
On Sat, 26 Jun 1999, Brad Jorsch wrote:
> On line 718 of strutl.cc (downloaded from ftp.debian.org), the function
> makes this check:
> if (At == SingleSlash)
> It turns out that, when parsing a line "file:/usr/local debs", At is
> actually one greater than SingleSlash! This confuses the function, and it
> ends up assigning "sr/local debs/" to Host (and "/" to User).
>
> I propose that the above line 718 be changed as follows:
> if (At >= SingleSlash)
> This way, the URI will be correctly parsed.
Hmm, 'oops'... The better fix is to put something like this
// Find the colon...
I = FirstColon + 1;
if (I > SingleSlash)
I = SingleSlash;
for (; I < SingleSlash && *I != ':'; I++);
string::const_iterator SecondColon = I;
arounds line 709. The +1 is what buggered it up..
Jason
Reply to: