Skip to content

Commit 0806aed

Browse files
authored
fetch-content: apply the repack filter on hard links destination (taskcluster#843)
1 parent b9c95a0 commit 0806aed

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/taskgraph/run-task/fetch-content

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,10 @@ def repack_archive(
603603
if tarinfo.isfile():
604604
tar.addfile(tarinfo, origtar.extractfile(tarinfo))
605605
else:
606+
# Hard links are relative to the root of the archive,
607+
# so the filter needs to be applied to its destination.
608+
if tarinfo.islnk():
609+
tarinfo.linkname = filter(tarinfo.linkname)
606610
tar.addfile(tarinfo)
607611
else:
608612
# We only change compression here. The tar stream is unchanged.

0 commit comments

Comments
 (0)