From: Martin v. Löwis Date: Sun, 15 Feb 2004 20:51:39 +0000 (+0000) Subject: Patch #817379: Allow for absolute ftp paths. X-Git-Tag: v2.4a1~813 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7db04e7c4802022cfb3a1daacab333cd9efd5a78;p=python Patch #817379: Allow for absolute ftp paths. Backported to 2.3. --- diff --git a/Lib/urllib2.py b/Lib/urllib2.py index 43e9c7d25a..0980ce298f 100644 --- a/Lib/urllib2.py +++ b/Lib/urllib2.py @@ -1099,8 +1099,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:]