Specify text encoding for zero-fill map file

This commit is contained in:
2Shirt 2023-07-09 13:23:21 -07:00
parent 090a9f2b96
commit 840008d8cd
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -2242,7 +2242,7 @@ def zero_fill_destination(state: State, dry_run: bool = True) -> None:
)
io.copy_file(block_pair.map_path, zero_map_path, overwrite=True)
if larger_destination:
with open(zero_map_path, 'a') as f:
with open(zero_map_path, 'a', encoding='utf-8') as f:
f.write(
f'{hex(block_pair.size)} '
f'{hex(destination_size - block_pair.size)} ?'