[Zope] [HELP] CookId and FTP upload problem

Frédéric LEMAITRE fred_lemaitre@yahoo.com
Fri, 29 Mar 2002 07:20:23 -0800 (PST)


Hello,

Like many others, in order to let user publish content
without taking care of the "Id", i use a method
"cookId" in order to generate a valid object's id from
a "Title".

Exemple : 
	When an user upload the file "Fréd Reunion.doc"
	"cookId" generates the id : "FredReunion.doc"  ==>
Ok.

It's work fine, but i got a problem with FTP acces
when an user "drag and drop" a folder named "Fred
Folder" and it's content. The FTP log is :
	MKD "Fred Folder"
	CWD "Fred Folder" ==> 550 No such directory.

Cause the "Fred Folder" doesn't exist, it's
"FredFolder". So, the content of the folder is not
uploaded.


I found in the file "\Zope\ZServer\FTPServer.py", the
method :
   def cmd_cwd (self, line):
        'change working directory'
        
        response=make_response(self,
self.cwd_completion, 
                self._join_paths(self.path,line[1]))
       
request=FTPRequest(line[1],'CWD',self,response)
        handle(self.module,request,response)     


Can anybody help me, is there a way to patch this
method ?
Something like "line = cookId(line)" doesn't seem to
work.
Any idea ?


Thanks in advance.
P.S : Excuse my english
Fred.

__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - send holiday greetings for Easter, Passover
http://greetings.yahoo.com/