--- ffsearch.pl-orig	2004-05-23 03:20:52.000000000 +0200
+++ ffsearch.pl	2004-05-23 03:59:16.000000000 +0200
@@ -1402,7 +1402,7 @@
 
 	# get the server identification
 	my $message = $ftp_handle->message ();
-	if ($message =~ /PureFTPd/i || $message =~ /Pure-FTPd/i	# PureFTPd sends only 2000 lines of "ls -lR"
+	if ($message =~ /PureFTPd/i || $message =~ /Pure-FTPd/i	|| $message =~ /FTP server ready./ # PureFTPd sends only 2000 lines of "ls -lR"
 	    || $message =~ /CesarFTP/i		# CesarFTP does not print "<DIRECTORY>:"
 	    || $message =~ /GuildFTPd/i		# GuildFTPd gets crazy when attempting to use "ls -lR"
 	    || $message =~ /Microsoft/i		# FFSearch can't parse output of "ls -lR" of Microsoft FTP server
@@ -1552,10 +1552,10 @@
 
 	foreach (@$out)
 	{
-		if (/^([d\-])\S{9}\s+\S+\s+\S+\s+\S+\s+(\d+)\s+(\S+)\s+(\d+)\s+(\S+) (.*?)\r?$/		# UNIX format
-			|| /^([d\-])\S{9}\s+\S+\s+\S+\s+(\d+)\s+(\S+)\s+(\d+)\s+(\S+) (.*?)\r?$/	# similar to UNIX format
-			|| /^([d\-])\s+\[[^\]]+\]\s+\S+\s+(\d+)\s+(\S+)\s+(\d+)\s+(\S+) (.*?)\r?$/	# Novell Netware format
-			|| /^([d\-])\[[^\]]+\]\s+\d+\s+\S+\s+(\d+)\s+(\S+)\s+(\d+)\s+(\S+) (.*?)\r?$/)	# another Novell Netware format
+		if (/^([dl\-])\S{9}\s+\S+\s+\S+\s+\S+\s+(\d+)\s+(\S+)\s+(\d+)\s+(\S+) (.*?)\r?$/		# UNIX format
+			|| /^([dl\-])\S{9}\s+\S+\s+\S+\s+(\d+)\s+(\S+)\s+(\d+)\s+(\S+) (.*?)\r?$/	# similar to UNIX format
+			|| /^([dl\-])\s+\[[^\]]+\]\s+\S+\s+(\d+)\s+(\S+)\s+(\d+)\s+(\S+) (.*?)\r?$/	# Novell Netware format
+			|| /^([dl\-])\[[^\]]+\]\s+\d+\s+\S+\s+(\d+)\s+(\S+)\s+(\d+)\s+(\S+) (.*?)\r?$/)	# another Novell Netware format
 		{
 			my $name = $6;
 			next if (($name eq ".") || ($name eq "..") || ($name eq ""));
@@ -1571,8 +1571,16 @@
 				push (@scan, $name);
 				next;
 			}
+			elsif ($ftype eq 'l')
+			{
+				&log_print ("$ftp_host:$ftp_port: following symlink $name.", 1);
+				$name =~ s/ ->.*$//;
+				push (@scan, $name);
+				next;
+			}
+
 		}
-		elsif (/^([d\-])\S{9}\s+\S+\s+\S+\s+\S+\s+(\d+)\s+(\d{4}-\d\d-\d\d \d\d:\d\d) ([^\/]*?)\/?\r?$/)    # similar to UNIX format
+		elsif (/^([dl\-])\S{9}\s+\S+\s+\S+\s+\S+\s+(\d+)\s+(\d{4}-\d\d-\d\d \d\d:\d\d) ([^\/]*?)\/?\r?$/)    # similar to UNIX format
 		{
 			my $name = $4;
 			next if (($name eq ".") || ($name eq "..") || ($name eq ""));
@@ -1588,6 +1596,13 @@
 				push (@scan, $name);
 				next;
 			}
+			elsif ($ftype eq 'l')
+			{
+				&log_print ("$ftp_host:$ftp_port: following symlink $name.", 1);
+				$name =~ s/ ->.*$//;
+				push (@scan, $name);
+				next;
+			}
 		}
 		elsif (/^(\d\d)-(\d\d)-(\d\d)\s+(\d\d):(\d\d)([AP])M\s+(\d+) (.*?)\r?$/)	# Microsoft format - files
 		{

