From: wessels <> Date: Tue, 12 Jan 1999 03:09:38 +0000 (+0000) Subject: // fix from Henrik X-Git-Tag: SQUID_3_0_PRE1~2439 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4c75f0310f419d714b8d548f0f077d1a54d0920c;p=thirdparty%2Fsquid.git // fix from Henrik --- diff --git a/src/ftp.cc b/src/ftp.cc index 839a318395..1cd8f19b7c 100644 --- a/src/ftp.cc +++ b/src/ftp.cc @@ -1,6 +1,6 @@ /* - * $Id: ftp.cc,v 1.259 1999/01/11 20:05:50 wessels Exp $ + * $Id: ftp.cc,v 1.260 1999/01/11 20:09:38 wessels Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -1395,8 +1395,11 @@ ftpReadType(FtpStateData * ftpState) char *d, *p; debug(9, 3) ("This is ftpReadType\n"); if (code == 200) { - path = xstrdup(strBuf(ftpState->request->urlpath)); - for (d = p = path; *p; d = p) { + p = path = xstrdup(strBuf(ftpState->request->urlpath)); + if (*p == '/') + p++; + while (*p) { + d = p; p += strcspn(p, "/"); if (*p) *p++ = '\0';