From b02ff8b6e56af997895657741999b2f9e1ea4a8b Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Mon, 27 Jan 2025 10:51:06 -0800 Subject: [PATCH] Fix "spot" check file count delta error (#981). --- NEWS | 1 + borgmatic/actions/check.py | 4 ++-- borgmatic/borg/list.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 7cf99693..d06f0ff5 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ 1.9.9.dev0 + * #981: Fix "spot" check file count delta error. * #982: Fix for borgmatic "exclude_patterns" and "exclude_from" recursing into excluded subdirectories. diff --git a/borgmatic/actions/check.py b/borgmatic/actions/check.py index 8c9575e4..00522de4 100644 --- a/borgmatic/actions/check.py +++ b/borgmatic/actions/check.py @@ -443,7 +443,7 @@ def collect_spot_check_archive_paths( config, local_borg_version, global_arguments, - path_format='{type} {path}{NL}', # noqa: FS003 + path_format='{type} {path}{NUL}', # noqa: FS003 local_path=local_path, remote_path=remote_path, ) @@ -540,7 +540,7 @@ def compare_spot_check_hashes( local_borg_version, global_arguments, list_paths=source_sample_paths_subset, - path_format='{xxh64} {path}{NL}', # noqa: FS003 + path_format='{xxh64} {path}{NUL}', # noqa: FS003 local_path=local_path, remote_path=remote_path, ) diff --git a/borgmatic/borg/list.py b/borgmatic/borg/list.py index d995f262..52b4a096 100644 --- a/borgmatic/borg/list.py +++ b/borgmatic/borg/list.py @@ -131,7 +131,7 @@ def capture_archive_listing( borg_local_path=local_path, borg_exit_codes=config.get('borg_exit_codes'), ) - .strip('\n') + .strip('\0') .split('\0') )