From: Martin v. Löwis Date: Sun, 15 Feb 2004 20:52:00 +0000 (+0000) Subject: Patch #817379: Allow for absolute ftp paths. X-Git-Tag: v2.3.4c1~127 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3b2f4c8ae3bcfbd150d8226562e5d2c3e2ef0aa6;p=thirdparty%2FPython%2Fcpython.git Patch #817379: Allow for absolute ftp paths. --- diff --git a/Lib/urllib2.py b/Lib/urllib2.py index d0f1ad7830d9..51ab15584c5c 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -1021,8 +1021,8 @@ class FTPHandler(BaseHandler): if port is None: port = ftplib.FTP_PORT path, attrs = splitattr(req.get_selector()) - path = unquote(path) dirs = path.split('/') + dirs = map(unquote, dirs) dirs, file = dirs[:-1], dirs[-1] if dirs and not dirs[0]: dirs = dirs[1:]