Browse Source

Fix "spot" check file count delta error (#981).

Dan Helfman 4 months ago
parent
commit
b02ff8b6e5
3 changed files with 4 additions and 3 deletions
  1. 1 0
      NEWS
  2. 2 2
      borgmatic/actions/check.py
  3. 1 1
      borgmatic/borg/list.py

+ 1 - 0
NEWS

@@ -1,4 +1,5 @@
 1.9.9.dev0
 1.9.9.dev0
+ * #981: Fix "spot" check file count delta error.
  * #982: Fix for borgmatic "exclude_patterns" and "exclude_from" recursing into excluded
  * #982: Fix for borgmatic "exclude_patterns" and "exclude_from" recursing into excluded
    subdirectories.
    subdirectories.
 
 

+ 2 - 2
borgmatic/actions/check.py

@@ -443,7 +443,7 @@ def collect_spot_check_archive_paths(
             config,
             config,
             local_borg_version,
             local_borg_version,
             global_arguments,
             global_arguments,
-            path_format='{type} {path}{NL}',  # noqa: FS003
+            path_format='{type} {path}{NUL}',  # noqa: FS003
             local_path=local_path,
             local_path=local_path,
             remote_path=remote_path,
             remote_path=remote_path,
         )
         )
@@ -540,7 +540,7 @@ def compare_spot_check_hashes(
                     local_borg_version,
                     local_borg_version,
                     global_arguments,
                     global_arguments,
                     list_paths=source_sample_paths_subset,
                     list_paths=source_sample_paths_subset,
-                    path_format='{xxh64} {path}{NL}',  # noqa: FS003
+                    path_format='{xxh64} {path}{NUL}',  # noqa: FS003
                     local_path=local_path,
                     local_path=local_path,
                     remote_path=remote_path,
                     remote_path=remote_path,
                 )
                 )

+ 1 - 1
borgmatic/borg/list.py

@@ -131,7 +131,7 @@ def capture_archive_listing(
             borg_local_path=local_path,
             borg_local_path=local_path,
             borg_exit_codes=config.get('borg_exit_codes'),
             borg_exit_codes=config.get('borg_exit_codes'),
         )
         )
-        .strip('\n')
+        .strip('\0')
         .split('\0')
         .split('\0')
     )
     )