Fix for a "spot" check error when a filename in the most recent archive contains a newline (#968).

This commit is contained in:
Dan Helfman
2025-01-18 09:54:30 -08:00
parent e66df22a6e
commit e3d40125cb
3 changed files with 6 additions and 5 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
1.9.7
* #970: Fix for an error when a blank line occurs in the configured patterns or excludes.
* #968: Fix for a "spot" check error when a filename in the most recent archive contains a newline.
* #970: Fix for an error when there's a blank line in the configured patterns or excludes.
1.9.6
* #959: Fix an error in the Btrfs hook when a subvolume mounted at "/" is configured in borgmatic's
+1 -1
View File
@@ -401,7 +401,7 @@ def collect_spot_check_source_paths(
paths = tuple(
path_line.split(' ', 1)[1]
for path_line in paths_output.split('\n')
for path_line in paths_output.splitlines()
if path_line and path_line.startswith('- ') or path_line.startswith('+ ')
)
+3 -3
View File
@@ -120,7 +120,7 @@ def capture_archive_listing(
paths=[path for path in list_paths] if list_paths else None,
find_paths=None,
json=None,
format=path_format or '{path}{NL}', # noqa: FS003
format=path_format or '{path}{NUL}', # noqa: FS003
),
global_arguments,
local_path,
@@ -132,7 +132,7 @@ def capture_archive_listing(
borg_exit_codes=config.get('borg_exit_codes'),
)
.strip('\n')
.split('\n')
.split('\0')
)
@@ -230,7 +230,7 @@ def list_archive(
borg_exit_codes=borg_exit_codes,
)
.strip('\n')
.split('\n')
.splitlines()
)
else:
archive_lines = (list_arguments.archive,)