Skip to content

Commit 37d95f7

Browse files
authored
Merge pull request #29 from ehaupt/specify_tar_format
Use GNU_FORMAT in tarfile to avoid '././@PaxHeader' in archives
2 parents 3208bfa + 590b41b commit 37d95f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: tdworkflow/util.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def archive_files(target_dir: str, exclude_patterns: List[str]) -> io.BytesIO:
1616

1717
target_dir_path = Path(target_dir)
1818
_bytes = io.BytesIO()
19-
with tarfile.open(mode="w:gz", fileobj=_bytes) as tar:
19+
with tarfile.open(mode="w:gz", fileobj=_bytes, format=tarfile.GNU_FORMAT) as tar:
2020
for current_dir, directories, files in os.walk(target_dir_path):
2121
for file_or_dir in [*directories, *files]:
2222
file_path = Path(os.path.join(current_dir, file_or_dir))

0 commit comments

Comments
 (0)