mirror of
https://github.com/python/cpython.git
synced 2026-03-06 13:00:50 +00:00
gh-57911: Fix failing symlink test in tarfile (GH-138626)
This commit is contained in:
parent
7a3bca50e0
commit
59edf12705
1 changed files with 2 additions and 2 deletions
|
|
@ -3694,7 +3694,7 @@ def setUpClass(cls):
|
|||
else:
|
||||
raise AssertionError('Could not determine link resolution')
|
||||
else:
|
||||
cls.dotdot_resolves_early = True
|
||||
cls.dotdot_resolves_early = False
|
||||
|
||||
@contextmanager
|
||||
def check_context(self, tar, filter, *, check_flag=True):
|
||||
|
|
@ -3842,7 +3842,7 @@ def test_parent_symlink(self):
|
|||
arc.add('current', symlink_to='.')
|
||||
|
||||
# effectively points to ./../
|
||||
if self.dotdot_resolves_early:
|
||||
if self.dotdot_resolves_early and os_helper.can_symlink():
|
||||
arc.add('parent', symlink_to='current/../..')
|
||||
else:
|
||||
arc.add('parent', symlink_to='current/..')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue