]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
// fix from Henrik
authorwessels <>
Tue, 12 Jan 1999 03:09:38 +0000 (03:09 +0000)
committerwessels <>
Tue, 12 Jan 1999 03:09:38 +0000 (03:09 +0000)
src/ftp.cc

index 839a318395dff190003db44b0aba078f95cde16a..1cd8f19b7cec67878f74178fa207184b90fc157d 100644 (file)
@@ -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';