[Zope3-checkins] CVS: Zope3/src/zope/server/ftp - ftpserverchannel.py:1.3

Anthony Baxter anthony@interlink.com.au
Thu, 9 Jan 2003 05:27:56 -0500


Update of /cvs-repository/Zope3/src/zope/server/ftp
In directory cvs.zope.org:/tmp/cvs-serv6569

Modified Files:
	ftpserverchannel.py 
Log Message:
made ftp's LIST command actually work. This could never have worked. It now
works with every ftp client I can get my hands on.


=== Zope3/src/zope/server/ftp/ftpserverchannel.py 1.2 => 1.3 ===
--- Zope3/src/zope/server/ftp/ftpserverchannel.py:1.2	Wed Dec 25 09:15:23 2002
+++ Zope3/src/zope/server/ftp/ftpserverchannel.py	Thu Jan  9 05:27:53 2003
@@ -495,7 +495,9 @@
         # Make a pretty unix-like FTP output
         if long:
             file_list = map(ls_longify, file_list)
-        return ''.join(map(lambda line: line + '\r\n', file_list))
+        else:
+            file_list = [ x[0] for x in file_list ]
+        return '\r\n'.join(file_list) + '\r\n'