File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ def url2pathname(url):
2626 # Skip past extra slash before UNC drive in URL path.
2727 url = url [1 :]
2828 else :
29- if url [:1 ] == '/' and url [2 :3 ] in ':|' :
29+ if url [:1 ] == '/' and url [2 :3 ] in ( ':' , '|' ) :
3030 # Skip past extra slash before DOS drive in URL path.
3131 url = url [1 :]
3232 if url [1 :2 ] == '|' :
Original file line number Diff line number Diff line change @@ -1484,6 +1484,7 @@ def test_pathname2url_nonascii(self):
14841484 'test specific to Windows pathnames.' )
14851485 def test_url2pathname_win (self ):
14861486 fn = urllib .request .url2pathname
1487+ self .assertEqual (fn ('/' ), '\\ ' )
14871488 self .assertEqual (fn ('/C:/' ), 'C:\\ ' )
14881489 self .assertEqual (fn ("///C|" ), 'C:' )
14891490 self .assertEqual (fn ("///C:" ), 'C:' )
You can’t perform that action at this time.
0 commit comments