[ftputil] FTPHost.makedirs has a bug with non-root directories when invoked on a Windows machine

Richard Holden rholden at movenetworks.com
Wed Jul 30 01:19:34 CEST 2008


Example FTP Layout:

/data/test_results/ is the ftp users home directory.

If I use FTPHost.makedirs() as FTPHost.makedirs('1234/') from a Windows machine it creates the
/data/test_results/\data/test_results/1234/ directory.

This is caused by using os.sep to reinsert the seperator lost by the split. I am attaching a patch with a testcase that fixes the problem for me.

-Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://codespeak.net/pipermail/ftputil/attachments/20080729/0ffaea05/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: makedirs.patch
Type: application/octet-stream
Size: 1233 bytes
Desc: makedirs.patch
Url : http://codespeak.net/pipermail/ftputil/attachments/20080729/0ffaea05/attachment.obj 


More information about the ftputil mailing list