Ticket #27 (closed defect: fixed)

Opened 2 years ago

Last modified 15 months ago

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) (diff)

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

Changed 2 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

Changed 2 years ago by schwa

  • status changed from assigned to closed
  • resolution set to invalid

Changed 2 years ago by schwa

  • keywords Windows, os.sep, FTPHost.sep added
  • status changed from closed to reopened
  • resolution invalid deleted
  • description modified (diff)

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

A fix has been supplied in changeset [719].

Stefan

Changed 2 years ago by schwa

  • status changed from reopened to closed
  • resolution set to fixed
  • description modified (diff)
  • 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

Changed 2 years ago by schwa

  • description modified (diff)

Changed 15 months ago by schwa

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