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
|
@ -437,6 +437,8 @@ class FTP:
|
||||||
except error_perm, msg:
|
except error_perm, msg:
|
||||||
if msg[:3] != '500':
|
if msg[:3] != '500':
|
||||||
raise error_perm, msg
|
raise error_perm, msg
|
||||||
|
elif dirname == '':
|
||||||
|
dirname = '.' # does nothing, but could return error
|
||||||
cmd = 'CWD ' + dirname
|
cmd = 'CWD ' + dirname
|
||||||
return self.voidcmd(cmd)
|
return self.voidcmd(cmd)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue