Issue21160: Correct comments in nturl2path. Patch by Jurko Gospodnetić.
This commit is contained in:
parent
677744b386
commit
458123bd18
|
@ -5,7 +5,9 @@ def url2pathname(url):
|
|||
to a file system path; not recommended for general use."""
|
||||
# e.g.
|
||||
# ///C|/foo/bar/spam.foo
|
||||
# becomes
|
||||
# and
|
||||
# ///C:/foo/bar/spam.foo
|
||||
# become
|
||||
# C:\foo\bar\spam.foo
|
||||
import string, urllib.parse
|
||||
# Windows itself uses ":" even in URLs.
|
||||
|
@ -41,7 +43,7 @@ def pathname2url(p):
|
|||
# e.g.
|
||||
# C:\foo\bar\spam.foo
|
||||
# becomes
|
||||
# ///C|/foo/bar/spam.foo
|
||||
# ///C:/foo/bar/spam.foo
|
||||
import urllib.parse
|
||||
if not ':' in p:
|
||||
# No drive specifier, just convert slashes and quote the name
|
||||
|
|
Loading…
Reference in New Issue