]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix #17967 - Fix related to regression on Windows.
authorSenthil Kumaran <senthil@uthcode.com>
Sun, 2 Jun 2013 18:59:47 +0000 (11:59 -0700)
committerSenthil Kumaran <senthil@uthcode.com>
Sun, 2 Jun 2013 18:59:47 +0000 (11:59 -0700)
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

index 30e43e6f9f9170393a69cadbc1de044aeadd5c4f..a7445d185d0490b529f228e6ebaafeb9eb37b700 100644 (file)
@@ -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