Message260122
Paths prefixed with "\\?\" also need to be normalized, not just absolute. AFAIK there are no official docs on what normalization is required, but it includes at least trimming trailing dots on directory names, removing "." and ".." sections, adjacent backslashes, and removing trailing spaces on any segment.
Without this, you will access/create/etc. files that users cannot otherwise see or modify.
I don't disagree that we should add the prefix for long paths, but we need to at least get most of the normalization correct so that cases like this work:
>>> open('C:\\Dir \\file.txt.', 'r').read()
"Content"
>>> open('\\\\?\\C:\\Dir \\file.txt.', 'r').read()
FileNotFoundError: [Errno 2] No such file or directory: '\\\\?\\C:\\Dir \\file.txt.' |
|
Date |
User |
Action |
Args |
2016-02-11 18:48:57 | steve.dower | set | recipients:
+ steve.dower, loewis, pitrou, vstinner, ezio.melotti, Aaron.Meurer, santoso.wijaya, Voo, jens, zach.ware, serhiy.storchaka, eryksun |
2016-02-11 18:48:57 | steve.dower | set | messageid: <1455216537.57.0.0253650974626.issue18199@psf.upfronthosting.co.za> |
2016-02-11 18:48:57 | steve.dower | link | issue18199 messages |
2016-02-11 18:48:57 | steve.dower | create | |
|