From caa00fec19705c656497658c6ff1b1fff62a4484 Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Sun, 2 Jun 2013 11:59:47 -0700 Subject: 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. --- Lib/urllib/request.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index 30e43e6..a7445d1 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 -- cgit v0.12