Mercurial > cpython-lru_cache-weakref
changeset 84007:dbfbdf2b5c19 3.3
Fix #17967: For ftp urls CWD to target instead of hopping to each directory
towards target. This fixes a bug where target is accessible, but parent
directories are restricted.
| author | Senthil Kumaran <senthil@uthcode.com> |
|---|---|
| date | Sat, 01 Jun 2013 08:27:06 -0700 |
| parents | 81c02d2c830d |
| children | c1101f0d6c29 b6464827bddb |
| files | Lib/urllib/request.py |
| diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Lib/urllib/request.py Fri May 31 22:31:02 2013 +0300 +++ b/Lib/urllib/request.py Sat Jun 01 08:27:06 2013 -0700 @@ -2273,8 +2273,7 @@ self.ftp = ftplib.FTP() self.ftp.connect(self.host, self.port, self.timeout) self.ftp.login(self.user, self.passwd) - for dir in self.dirs: - self.ftp.cwd(dir) + self.ftp.cwd(os.path.join(*self.dirs)) def retrfile(self, file, type): import ftplib
