]> 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:09 +0000 (11:59 -0700)
committerSenthil Kumaran <senthil@uthcode.com>
Sun, 2 Jun 2013 18:59:09 +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.py

index 09a054b623cbcb5b4e02ffeda16cb18757ca43a0..244cb05374d1b49f4251b03afd589725542112f1 100644 (file)
@@ -873,7 +873,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