Improve full_disk_clone definition

This commit is contained in:
2Shirt 2023-08-26 17:39:27 -07:00
parent 075a0d8541
commit f7345a8a54
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -649,11 +649,13 @@ def zero_fill_gaps(
) -> None:
"""Zero-fill any gaps on the destination."""
#fake_settings_menu = menus.settings(state.mode)
full_disk_clone = False
full_disk_clone = bool(
state.mode == 'Clone'
and len(state.block_pairs) == 1
and not state.source.parent
)
larger_destination = state.source.size < dest_size
percent_recovered = state.get_percent_recovered()
if state.mode == 'Clone' and len(state.block_pairs) == 1:
full_disk_clone = True
# Bail early
if percent_recovered == 100 and not (larger_destination and extend_to_end):