Avoid duplicate exclude_files_larger_than treatment

This commit is contained in:
deajan 2025-03-04 16:35:00 +01:00
parent 0c1af56ae8
commit 3ee58a2430

View file

@ -1002,16 +1002,12 @@ class ResticRunner:
if exclude_caches:
cmd += " --exclude-caches"
if exclude_files_larger_than:
exclude_files_larger_than = int(
BytesConverter(exclude_files_larger_than).bytes
)
if exclude_files_larger_than:
try:
# Default --exclude_larger_than unit is bytes
exclude_files_larger_than = int(
BytesConverter(exclude_files_larger_than)
BytesConverter(exclude_files_larger_than).bytes
)
except ValueError:
warning = f"Bogus unit for exclude_files_larger_than value given: {exclude_files_larger_than}"