1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-13 15:57:14 +03:00

utils_ship: Correct fat-finger/bad replace on '\0'

This commit is contained in:
Athanasius 2021-04-01 15:35:46 +01:00
parent b70efab345
commit cd2407c1c3

View File

@ -60,4 +60,4 @@ def ship_file_name(ship_name: str, ship_type: str) -> str:
'lpt0', 'lpt2', 'lpt3', 'lpt4', 'lpt5', 'lpt6', 'lpt7', 'lpt8', 'lpt9'):
name = name + '_'
return name.translate({ord(x): u'_' for x in ('\-1', '<', '>', ':', '"', '/', '\\', '|', '?', '*')})
return name.translate({ord(x): u'_' for x in ('\0', '<', '>', ':', '"', '/', '\\', '|', '?', '*')})