diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2013-06-02 18:59:47 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2013-06-02 18:59:47 (GMT) |
commit | caa00fec19705c656497658c6ff1b1fff62a4484 (patch) | |
tree | 90385154293ec0e5fc31ef5d5a206c03ec7d10b3 /Lib/urllib | |
parent | d71001749dfb97db677c7720f53f4a8df56dcf63 (diff) | |
download | cpython-caa00fec19705c656497658c6ff1b1fff62a4484.zip cpython-caa00fec19705c656497658c6ff1b1fff62a4484.tar.gz cpython-caa00fec19705c656497658c6ff1b1fff62a4484.tar.bz2 |
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.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 |