Issue #14160: TarFile.extractfile() failed to resolve symbolic links
when the links were not located in an archive subdirectory.
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
index 1757e44..f32eb8c 100644
--- a/Lib/test/test_tarfile.py
+++ b/Lib/test/test_tarfile.py
@@ -166,6 +166,9 @@
def test_fileobj_symlink2(self):
self._test_fileobj_link("./ustar/linktest2/symtype", "ustar/linktest1/regtype")
+ def test_issue14160(self):
+ self._test_fileobj_link("symtype2", "ustar/regtype")
+
class CommonReadTest(ReadTest):