Fix for a "bad character" Borg error in which the "spot" check fed Borg an invalid pattern (#899).
All checks were successful
build / test (push) Successful in 6m5s
build / docs (push) Successful in 1m32s

This commit is contained in:
Dan Helfman 2024-07-25 11:34:09 -07:00
parent e128a3e0a9
commit 424cc6b66c
3 changed files with 9 additions and 6 deletions

1
NEWS
View File

@ -1,5 +1,6 @@
1.8.14.dev0
* #896: Fix an error in borgmatic rcreate/init on an empty repository directory with Borg 1.4.
* #899: Fix for a "bad character" Borg error in which the "spot" check fed Borg an invalid pattern.
* #900: Fix for a potential traceback (TypeError) during the handling of another error.
* Add a recent contributors section to the documentation, because credit where credit's due! See:
https://torsion.org/borgmatic/#recent-contributors

View File

@ -147,7 +147,8 @@ def collect_archive_data_source_names(
local_borg_version,
global_arguments,
list_paths=[
os.path.expanduser(
'sh:'
+ os.path.expanduser(
borgmatic.hooks.dump.make_data_source_dump_path(borgmatic_source_directory, pattern)
)
for pattern in ('*_databases/*/*',)

View File

@ -100,10 +100,11 @@ def capture_archive_listing(
remote_path=None,
):
'''
Given a local or remote repository path, an archive name, a configuration dict, the local Borg
version, global arguments as an argparse.Namespace, the archive paths in which to list files,
the Borg path format to use for the output, and local and remote Borg paths, capture the output
of listing that archive and return it as a list of file paths.
Given a local or remote repository path, an archive name, a configuration
dict, the local Borg version, global arguments as an argparse.Namespace,
the archive paths (or Borg patterns) in which to list files, the Borg path
format to use for the output, and local and remote Borg paths, capture the
output of listing that archive and return it as a list of file paths.
'''
borg_environment = environment.make_environment(config)
@ -116,7 +117,7 @@ def capture_archive_listing(
argparse.Namespace(
repository=repository_path,
archive=archive,
paths=[f'sh:{path}' for path in list_paths] if list_paths else None,
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