Index: squid/src/ftp.c
diff -u squid/src/ftp.c:1.1.1.29 squid/src/ftp.c:1.1.1.29.2.1
--- squid/src/ftp.c:1.1.1.29 Sun Jan 24 09:34:11 1999
+++ squid/src/ftp.c Fri Jan 29 01:57:31 1999
@@ -531,7 +531,23 @@
}
snprintf(sbuf, 128, "%s %s", tokens[0], tokens[1]);
p->date = xstrdup(sbuf);
- p->name = xstrdup(tokens[3]);
+ if (p->type == 'd') {
+ /* Directory.. name begins with first printable after
*/
+ ct=strstr(buf, tokens[2]);
+ ct+=strlen(tokens[2]);
+ while(isspace(*t))
+ ct++;
+ if (!*t)
+ ct=NULL;
+ } else {
+ /* A file. Name begins after size, with a space in between */
+ snprintf(sbuf, 128, " %s %s", tokens[2], tokens[3]);
+ ct = strstr(buf, sbuf);
+ if (ct) {
+ ct += strlen(tokens[2]) + 2;
+ }
+ }
+ p->name = xstrdup(ct ? ct : tokens[3]);
}
/* Try EPLF format; carson@lehman.com */
if (p->name == NULL && buf[0] == '+') {