[issue36534] tarfile: handling Windows (path) illegal characters in archive member names
STINNER Victor
report at bugs.python.org
Tue Oct 6 07:06:11 EDT 2020
STINNER Victor <vstinner at 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 <report at bugs.python.org>
<https://bugs.python.org/issue36534>
_______________________________________
More information about the Python-bugs-list
mailing list