Skip to content

Commit 4a477d6

Browse files
Seems we don't need Windows gating here?
1 parent e529baf commit 4a477d6

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

Lib/test/test_tarfile.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4421,16 +4421,12 @@ def test_sneaky_hardlink_fallback_deep(self):
44214421
arc.add("s", hardlink_to=os.path.join("a", "b", "s"))
44224422

44234423
with self.check_context(arc.open(), 'data'):
4424-
if not os_helper.can_symlink() or sys.platform == "win32":
4425-
# See notes in test_sneaky_hardlink_fallback.
4426-
self.expect_exception(tarfile.LinkOutsideDestinationError)
4427-
else:
4428-
e = self.expect_exception(
4429-
tarfile.LinkFallbackError,
4430-
"link 's' would be extracted as a copy of "
4431-
+ "'a/b/s', which was rejected")
4432-
self.assertIsInstance(e.__cause__,
4433-
tarfile.LinkOutsideDestinationError)
4424+
e = self.expect_exception(
4425+
tarfile.LinkFallbackError,
4426+
"link 's' would be extracted as a copy of "
4427+
+ "'a/b/s', which was rejected")
4428+
self.assertIsInstance(e.__cause__,
4429+
tarfile.LinkOutsideDestinationError)
44344430

44354431
for filter in 'tar', 'fully_trusted':
44364432
with self.subTest(filter), self.check_context(arc.open(), filter):

0 commit comments

Comments
 (0)