STINNER Victor <vstin...@python.org> added the comment:
> Also, while _sanitize_windows_name() handles trailing dots, for some reason > it overlooks trailing spaces. It also doesn't handle reserved DOS device > names. The pathlib module has _WindowsFlavour.reserved_names list of Windows reserved names: >>> pprint.pprint(sorted(pathlib._WindowsFlavour.reserved_names)) ['AUX', 'COM1', 'COM2', 'COM3', 'COM4', 'COM5', 'COM6', 'COM7', 'COM8', 'COM9', 'CON', 'LPT1', 'LPT2', 'LPT3', 'LPT4', 'LPT5', 'LPT6', 'LPT7', 'LPT8', 'LPT9', 'NUL', 'PRN'] ---------- nosy: +vstinner _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36534> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com