From 4c75f0310f419d714b8d548f0f077d1a54d0920c Mon Sep 17 00:00:00 2001 From: wessels <> Date: Tue, 12 Jan 1999 03:09:38 +0000 Subject: [PATCH] // fix from Henrik --- src/ftp.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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'; -- 2.47.2