diff --git a/src/borg/archive.py b/src/borg/archive.py index c181a2a53..fefb2bb46 100644 --- a/src/borg/archive.py +++ b/src/borg/archive.py @@ -780,18 +780,7 @@ Duration: {0.duration} # In this case, we *want* to extract twice, because there is no other way. pass - def extract_item( - self, - item, - restore_attrs=True, - dry_run=False, - stdout=False, - sparse=False, - hlm=None, - stripped_components=0, - original_path=None, - pi=None, - ): + def extract_item(self, item, *, restore_attrs=True, dry_run=False, stdout=False, sparse=False, hlm=None, pi=None): """ Extract archive item. @@ -801,8 +790,6 @@ Duration: {0.duration} :param stdout: write extracted data to stdout :param sparse: write sparse files (chunk-granularity, independent of the original being sparse) :param hlm: maps hlid to link_target for extracting subtrees with hardlinks correctly - :param stripped_components: stripped leading path components to correct hard link extraction - :param original_path: 'path' key as stored in archive :param pi: ProgressIndicatorPercent (or similar) for file extraction progress (in bytes) """ has_damaged_chunks = "chunks_healthy" in item @@ -834,7 +821,6 @@ Duration: {0.duration} raise BackupError("File has damaged (all-zero) chunks. Try running borg check --repair.") return - original_path = original_path or item.path dest = self.cwd if item.path.startswith(("/", "../")): raise Exception("Path should be relative and local") diff --git a/src/borg/archiver/extract_cmd.py b/src/borg/archiver/extract_cmd.py index a3fed094e..af64b1ad9 100644 --- a/src/borg/archiver/extract_cmd.py +++ b/src/borg/archiver/extract_cmd.py @@ -75,15 +75,7 @@ class ExtractMixIn: dirs.append(item) archive.extract_item(item, stdout=stdout, restore_attrs=False) else: - archive.extract_item( - item, - stdout=stdout, - sparse=sparse, - hlm=hlm, - stripped_components=strip_components, - original_path=orig_path, - pi=pi, - ) + archive.extract_item(item, stdout=stdout, sparse=sparse, hlm=hlm, pi=pi) except (BackupOSError, BackupError) as e: self.print_warning("%s: %s", remove_surrogates(orig_path), e)