Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#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 schwa)

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 11 years ago by schwa

  • Status changed from new to assigned

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

comment:2 Changed 10 years ago by schwa

  • Resolution set to invalid
  • Status changed from assigned to closed

comment:3 Changed 10 years ago by schwa

  • Description modified (diff)
  • Keywords Windows os.sep FTPHost.sep added
  • Resolution invalid deleted
  • Status changed from closed to reopened

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

A fix has been supplied in changeset [719].

Stefan

comment:4 Changed 10 years ago by schwa

  • Description modified (diff)
  • Resolution set to fixed
  • Status changed from reopened to closed
  • Summary changed from makedirs on client to 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 10 years ago by schwa

  • Description modified (diff)

comment:6 Changed 10 years ago by schwa

  • Milestone set to 2.2.4
Note: See TracTickets for help on using tickets.