diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2013-06-02 18:59:09 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2013-06-02 18:59:09 (GMT) |
commit | 964c25f1d91d2f56bf3924b1d1feefaeb3b3b2c5 (patch) | |
tree | 1c7db9145dbc2eeed777b75d011b45b1a0ae49cf | |
parent | 7351b66eb9060cce37073bf323f73d79dc3ef488 (diff) | |
download | cpython-964c25f1d91d2f56bf3924b1d1feefaeb3b3b2c5.zip cpython-964c25f1d91d2f56bf3924b1d1feefaeb3b3b2c5.tar.gz cpython-964c25f1d91d2f56bf3924b1d1feefaeb3b3b2c5.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.
-rw-r--r-- | Lib/urllib.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py index 09a054b..244cb05 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -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 |