[New-bugs-announce] [issue11474] url2pathname() handling of '/C|/' on Windows

Bastian Kleineidam report at bugs.python.org
Sat Mar 12 16:30:23 CET 2011


New submission from Bastian Kleineidam <calvin at users.sourceforge.net>:

Python 2.7 on Windows converts the URL path '/C|/' to a naked drive letter 'C:'.

C:\src>c:\Python27\python.exe -c "import urllib;print urllib.url2pathname('/C|/')"
C:
C:\src>

Expected and I believe the correct output would be C:\, not C:. Reason is that a naked drive letter C: means "current directory in drive C:", whereas C:\ means "root directory in drive C:". So if you happen to start your application in "C:\src" for example, the output "C:" is interpreted as "C:\src", not as "C:\".

----------
components: Library (Lib)
messages: 130684
nosy: calvin
priority: normal
severity: normal
status: open
title: url2pathname() handling of '/C|/' on Windows
versions: Python 2.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11474>
_______________________________________


More information about the New-bugs-announce mailing list