Fix detection of full clones in zero_fill_gaps()

This prevents using the wrong domain size and crashing ddrescue.
This commit is contained in:
2Shirt 2023-10-22 19:53:04 -07:00
parent 80a0d9874a
commit 94c8c2ba01
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -652,7 +652,7 @@ def zero_fill_gaps(
full_disk_clone = bool(
state.mode == 'Clone'
and len(state.block_pairs) == 1
and not state.source.parent
and state.source.path == state.block_pairs[0].source
)
larger_destination = state.source.size < dest_size
percent_recovered = state.get_percent_recovered()