[Zope-Checkins] CVS: Zope2 - FTPRequest.py:1.7.118.4 FTPServer.py:1.13.8.5

Andreas Jung andreas@dhcp165.digicool.com
Mon, 9 Apr 2001 13:58:42 -0400


Update of /cvs-repository/Zope2/ZServer
In directory yetix:/work/zope/zope-2_3-branch/ZServer

Modified Files:
      Tag: zope-2_3-branch
	FTPRequest.py FTPServer.py 
Log Message:
undo changes



--- Updated File FTPRequest.py in package Zope2 --
--- FTPRequest.py	2001/04/09 16:45:47	1.7.118.3
+++ FTPRequest.py	2001/04/09 17:58:11	1.7.118.4
@@ -100,18 +100,10 @@
 class FTPRequest(HTTPRequest):
 
     def __init__(self, path, command, channel, response, stdin=None,
-                 environ=None,globbing=None,recursive=0):
-
-        # we need to store the globbing information to pass it
-        # to the ZPublisher and the manage_FTPlist function 
-        # (ajung)
-        self.globbing = globbing
-        self.recursive= recursive
-        
+                 environ=None):
         if stdin is None: stdin=StringIO()
         if environ is None:
             environ=self._get_env(path, command, channel, stdin)
-
         self._orig_env=environ
         HTTPRequest.__init__(self, stdin, environ, response, clean=1)
         
@@ -182,11 +174,6 @@
             env['CONTENT_LENGTH']=len(stdin.getvalue())
         else:
             env['PATH_INFO']=self._join_paths(channel.path, path, command)
-
-        # Fake in globbing information 
-        env['GLOBBING'] = self.globbing
-        env['FTP_RECURSIVE'] = self.recursive
-
         return env
     
     def _join_paths(self,*args):

--- Updated File FTPServer.py in package Zope2 --
--- FTPServer.py	2001/04/09 16:45:47	1.13.8.4
+++ FTPServer.py	2001/04/09 17:58:11	1.13.8.5
@@ -138,7 +138,8 @@
 
 from PubCore import handle
 from medusa.ftp_server import ftp_channel, ftp_server, recv_channel
-from medusa import asyncore, asynchat, filesys
+import asyncore, asynchat
+from medusa import filesys
 from FTPResponse import make_response
 from FTPRequest import FTPRequest
 
@@ -202,45 +203,28 @@
         self.get_dir_list(line,1)
     
     def get_dir_list(self, line, long=0):
-        self.globbing = None
-        self.recursive = 0
         # we need to scan the command line for arguments to '/bin/ls'...
         # XXX clean this up, maybe with getopts
-
         if len(line) > 1:
             args = string.split(line[1])
         else:
             args =[]
         path_args = []
-
-        # Extract globbing information 
-
-       
-        for i in range(len(args)):
-            x = args[i]
-            if string.find(x,'*')!=-1 or string.find(x,'?')!=-1:
-                self.globbing = x
-                args[i] = '.'     
-
         for arg in args:
             if arg[0] != '-':
                 path_args.append (arg)
             else:
                 if 'l' in arg:
                     long=1
-                if 'R' in arg:
-                    self.recursive = 1
-
         if len(path_args) < 1:
             dir = '.'
         else:
             dir = path_args[0]
-
         self.listdir(dir, long)
     
     def listdir (self, path, long=0):
         response=make_response(self, self.listdir_completion, long)
-        request=FTPRequest(path, 'LST', self, response,globbing=self.globbing,recursive=self.recursive)
+        request=FTPRequest(path, 'LST', self, response)
         handle(self.module, request, response)         
         
     def listdir_completion(self, long, response):