Message285510
isabs also fails for device paths such as r"\\.\C:", which is an absolute path for opening the C: volume. UNC and device paths (i.e. \\server, \\?, and \\.) should always be considered absolute. Only logical drives (i.e. C:, D:, etc) support drive-relative paths.
Also, join() needs to be smarter in this case:
>>> os.path.join(r'\\.\C:', 'spam')
'\\\\.\\C:spam'
It doesn't insert a backslash because the 'drive' ends in a colon. It needs to always insert a backslash for UNC paths, which cannot be reliably identified by checking whether the last character of the drive is a colon. |
|
Date |
User |
Action |
Args |
2017-01-15 14:31:24 | eryksun | set | recipients:
+ eryksun, pitrou, serhiy.storchaka, steve.dower, akima |
2017-01-15 14:31:24 | eryksun | set | messageid: <1484490684.29.0.698593810258.issue22302@psf.upfronthosting.co.za> |
2017-01-15 14:31:24 | eryksun | link | issue22302 messages |
2017-01-15 14:31:24 | eryksun | create | |
|