mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Patches by Michael Reilly to correctly deal with ftp URLs of the form
ftp://user@host//root/path: the double slash in the pathname means to go to the root directory even if the initial directory isn't the root.
This commit is contained in:
parent
8a07baef80
commit
1ebcf6aabb
1 changed files with 2 additions and 0 deletions
|
@ -437,6 +437,8 @@ class FTP:
|
|||
except error_perm, msg:
|
||||
if msg[:3] != '500':
|
||||
raise error_perm, msg
|
||||
elif dirname == '':
|
||||
dirname = '.' # does nothing, but could return error
|
||||
cmd = 'CWD ' + dirname
|
||||
return self.voidcmd(cmd)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue