mirror of
https://github.com/arcan1s/ahriman.git
synced 2026-02-24 13:49:48 +00:00
fix: force data filter for tar archive extraction
(python3.14 default anyway)
This commit is contained in:
@@ -81,11 +81,13 @@ class Backup(Handler):
|
||||
Returns:
|
||||
set[Path]: map of the filesystem paths
|
||||
"""
|
||||
paths = set(configuration.include.glob("*.ini"))
|
||||
|
||||
# configuration files
|
||||
root, _ = configuration.check_loaded()
|
||||
paths.add(root) # the configuration itself
|
||||
paths.add(SQLite.database_path(configuration)) # database
|
||||
paths = set(configuration.includes)
|
||||
paths.add(root)
|
||||
|
||||
# database
|
||||
paths.add(SQLite.database_path(configuration))
|
||||
|
||||
# local caches
|
||||
repository_paths = configuration.repository_paths
|
||||
|
||||
@@ -47,7 +47,7 @@ class Restore(Handler):
|
||||
report(bool): force enable or disable reporting
|
||||
"""
|
||||
with tarfile.open(args.path) as archive:
|
||||
archive.extractall(path=args.output) # nosec
|
||||
archive.extractall(path=args.output, filter="data")
|
||||
|
||||
@staticmethod
|
||||
def _set_repo_restore_parser(root: SubParserAction) -> argparse.ArgumentParser:
|
||||
|
||||
@@ -34,7 +34,7 @@ def test_run(args: argparse.Namespace, configuration: Configuration, mocker: Moc
|
||||
|
||||
_, repository_id = configuration.check_loaded()
|
||||
Restore.run(args, repository_id, configuration, report=False)
|
||||
extract_mock.extractall.assert_called_once_with(path=args.output)
|
||||
extract_mock.extractall.assert_called_once_with(path=args.output, filter="data")
|
||||
|
||||
|
||||
def test_disallow_multi_architecture_run() -> None:
|
||||
|
||||
Reference in New Issue
Block a user