From: Senthil Kumaran Date: Sun, 2 Jun 2013 18:59:47 +0000 (-0700) Subject: Fix #17967 - Fix related to regression on Windows. X-Git-Tag: v3.4.0a1~582^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=caa00fec19705c656497658c6ff1b1fff62a4484;p=thirdparty%2FPython%2Fcpython.git Fix #17967 - Fix related to regression on Windows. os.path.join(*self.dirs) produces an invalid path on windows. ftp paths are always forward-slash seperated like this. /pub/dir. --- diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index 30e43e6f9f91..a7445d185d04 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -2276,7 +2276,8 @@ class ftpwrapper: self.ftp = ftplib.FTP() self.ftp.connect(self.host, self.port, self.timeout) self.ftp.login(self.user, self.passwd) - self.ftp.cwd(os.path.join(*self.dirs)) + _target = '/'.join(self.dirs) + self.ftp.cwd(_target) def retrfile(self, file, type): import ftplib