~sschwarzer/ftputil#27: 
Relative FTPHost.makedirs creates a wrong directory when run from a Windows client

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.

Side note: The original description to which the first comment refers was

host.makedirs('foo') makes a directory named "\foo" on the server.

Status
RESOLVED FIXED
Submitter
ftputiluser (unverified)
Assigned to
No-one
Submitted
14 years ago
Updated
14 years ago
Labels
bug library

schwa (unverified) 14 years ago · edit

Dear ftputil user,

to be honest, I don't understand what you mean. Could you please describe the problem in more detail? Some example code showing the problem would also be helpful. What did you do, which outcome did you expect and which output did you get? Do you use the most current ftputil version (2.2.3)?

Stefan

schwa (unverified) 13 years ago · edit

I guess this bug is the same as the one ​reported by Richard Holden.

A fix has been supplied in changeset b5dc57c4c9b410fe3a7d652ea30465e9782a0bd0.

Stefan

schwa (unverified) 13 years ago · edit

I replaced the old bug description by the one from Richard Holden.

For the record, the old description was:

host.makedirs('foo') makes a directory named "\foo" on the server.

Stefan

Register here or Log in to comment, or comment via email.