Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7db04e7

Browse files
committed
Patch #817379: Allow for absolute ftp paths.
Backported to 2.3.
1 parent 32d23c9 commit 7db04e7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/urllib2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,8 +1099,8 @@ def ftp_open(self, req):
10991099
if port is None:
11001100
port = ftplib.FTP_PORT
11011101
path, attrs = splitattr(req.get_selector())
1102-
path = unquote(path)
11031102
dirs = path.split('/')
1103+
dirs = map(unquote, dirs)
11041104
dirs, file = dirs[:-1], dirs[-1]
11051105
if dirs and not dirs[0]:
11061106
dirs = dirs[1:]

0 commit comments

Comments
 (0)