pyinstaller
pyinstaller copied to clipboard
Inconsistent TOC subtraction behavior when entry's type is not specified
For TOC entries with typecode BINARY or DATA, unique_name does os.path.normcase on their name. In Windows, the effect of this is to lowercase the names. This means that on Windows if you try to remove a module with subtraction, giving its name with the same casing as it appears on disk, it will fail:
toc = TOC([('m1', None, None), ('m2', None, None), ('BadModule', None, 'BINARY')])
toc -= [('BadModule', None, None)]
print(toc)
# On Windows: -> [('m1', None, None), ('m2', None, None), ('BadModule', None, 'BINARY')]
# On Linux: -> [('m1', None, None), ('m2', None, None)]
Originally posted by @plu5 in https://github.com/pyinstaller/pyinstaller/issues/6669#issuecomment-1065963542