]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1508: Error in FTP listings of files with -> in their name
authorserassio <>
Sun, 26 Feb 2006 18:27:16 +0000 (18:27 +0000)
committerserassio <>
Sun, 26 Feb 2006 18:27:16 +0000 (18:27 +0000)
Forward port of 2.5 patch.

src/ftp.cc

index 5985b1a87d62518f7941ce6b989c8365bf36bf46..cd4493e97935d13af15ab422dfb2e2f842448fe2 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.388 2006/02/26 10:39:32 serassio Exp $
+ * $Id: ftp.cc,v 1.389 2006/02/26 11:27:16 serassio Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -730,7 +730,7 @@ ftpListParseParts(const char *buf, struct _ftp_flags flags)
 
             p->name = xstrdup(copyFrom);
 
-            if ((t = strstr(p->name, " -> "))) {
+            if (p->type == 'l' && (t = strstr(p->name, " -> "))) {
                 *t = '\0';
                 p->link = xstrdup(t + 4);
             }