]> granicus.if.org Git - python/commitdiff
Patch #817379: Allow for absolute ftp paths.
authorMartin v. Löwis <martin@v.loewis.de>
Sun, 15 Feb 2004 20:51:39 +0000 (20:51 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Sun, 15 Feb 2004 20:51:39 +0000 (20:51 +0000)
Backported to 2.3.

Lib/urllib2.py

index 43e9c7d25aa8b1ecf5df2e6b88e3bafee6e203a4..0980ce298f3f114014e160a0dfcbcf84551ef963 100644 (file)
@@ -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:]