diff options
author | 1999-08-18 21:51:10 +0000 | |
---|---|---|
committer | 1999-08-18 21:51:10 +0000 | |
commit | 1ebcf6aabb357de166f226d1355baefc541950e9 (patch) | |
tree | 9c26204bdbadfe6e76df600bd5b640dcc0fe46ba /Lib/ftplib.py | |
parent | Bump to version 1.1 (diff) | |
download | cpython-1ebcf6aabb357de166f226d1355baefc541950e9.tar.gz cpython-1ebcf6aabb357de166f226d1355baefc541950e9.tar.bz2 cpython-1ebcf6aabb357de166f226d1355baefc541950e9.zip |
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.
Diffstat (limited to 'Lib/ftplib.py')
-rw-r--r-- | Lib/ftplib.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/ftplib.py b/Lib/ftplib.py index d2ff4357004..eee8e5a8265 100644 --- a/Lib/ftplib.py +++ b/Lib/ftplib.py @@ -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) |