#27 closed defect (fixed)
Relative FTPHost.makedirs creates a wrong directory when run from a Windows client
Reported by: | ftputiluser | Owned by: | schwa |
---|---|---|---|
Priority: | major | Milestone: | 2.2.4 |
Component: | Library | Version: | |
Keywords: | Windows, os.sep, FTPHost.sep | Cc: |
Description (last modified by )
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.
Change History (6)
comment:1 Changed 13 years ago by
Status: | new → assigned |
---|
comment:2 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | assigned → closed |
comment:3 Changed 13 years ago by
Description: | modified (diff) |
---|---|
Keywords: | Windows os.sep FTPHost.sep added |
Resolution: | invalid |
Status: | closed → reopened |
comment:4 Changed 13 years ago by
Description: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | reopened → closed |
Summary: | makedirs on client → Relative FTPHost.makedirs creates a wrong directory when run from a Windows client |
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
comment:5 Changed 13 years ago by
Description: | modified (diff) |
---|
comment:6 Changed 12 years ago by
Milestone: | → 2.2.4 |
---|
Note: See
TracTickets for help on using
tickets.
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