Improve full_disk_clone definition
This commit is contained in:
parent
075a0d8541
commit
f7345a8a54
1 changed files with 5 additions and 3 deletions
|
|
@ -649,11 +649,13 @@ def zero_fill_gaps(
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Zero-fill any gaps on the destination."""
|
"""Zero-fill any gaps on the destination."""
|
||||||
#fake_settings_menu = menus.settings(state.mode)
|
#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
|
larger_destination = state.source.size < dest_size
|
||||||
percent_recovered = state.get_percent_recovered()
|
percent_recovered = state.get_percent_recovered()
|
||||||
if state.mode == 'Clone' and len(state.block_pairs) == 1:
|
|
||||||
full_disk_clone = True
|
|
||||||
|
|
||||||
# Bail early
|
# Bail early
|
||||||
if percent_recovered == 100 and not (larger_destination and extend_to_end):
|
if percent_recovered == 100 and not (larger_destination and extend_to_end):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue