Eryk Sun added the comment: The attached patch adds tests and the suggested enhancement to _WindowsFlavour.is_reserved.
Shouldn't it also return True if the name contains ASCII control characters? They're only valid in NTFS stream names. Also, I think a name containing a colon that's not part of a DOS drive letter spec should be considered reserved. Otherwise it could designate an NTFS named stream (e.g. "path\filename:streamname:$DATA"), which is rarely desired and not universally supported, e.g. FAT32 doesn't support file streams. I'm thinking of a program that calls this method to ensure that a path is reasonably 'safe' for use on Windows -- i.e. isn't inherently invalid and won't do something surprising like open NUL or write to a named stream. ---------- keywords: +patch Added file: http://bugs.python.org/file44588/issue_27827_01.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27827> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com