summaryrefslogtreecommitdiffstats
path: root/Lib/urllib
diff options
context:
space:
mode:
authorSenthil Kumaran <senthil@uthcode.com>2013-06-02 19:00:45 (GMT)
committerSenthil Kumaran <senthil@uthcode.com>2013-06-02 19:00:45 (GMT)
commit5ccf2ff3e9a72bccc7a8a8977106c03544f7ce6b (patch)
tree24ba6bbd2db554e70dd8042176c3ecae15059f04 /Lib/urllib
parent697fd46d152e0d9ef77ddb46cfad36d0777c1409 (diff)
parentcaa00fec19705c656497658c6ff1b1fff62a4484 (diff)
downloadcpython-5ccf2ff3e9a72bccc7a8a8977106c03544f7ce6b.zip
cpython-5ccf2ff3e9a72bccc7a8a8977106c03544f7ce6b.tar.gz
cpython-5ccf2ff3e9a72bccc7a8a8977106c03544f7ce6b.tar.bz2
merge from 3.3
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.
Diffstat (limited to 'Lib/urllib')
-rw-r--r--Lib/urllib/request.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py
index 84f177c..4765a94 100644
--- a/Lib/urllib/request.py
+++ b/Lib/urllib/request.py
@@ -2306,7 +2306,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