mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
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.
This commit is contained in:
parent
7d15b54f37
commit
4e42ae81f6
1 changed files with 1 additions and 2 deletions
|
@ -2273,8 +2273,7 @@ class ftpwrapper:
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue