Skip to content

Commit 58f5c2b

Browse files
committed
adjust wording
1 parent 2ccc462 commit 58f5c2b

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

Lib/tarfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2721,8 +2721,8 @@ def makelink_with_filter(self, tarinfo, targetpath,
27212721
link_target = tarinfo.linkname
27222722
if os.name == "nt":
27232723
# gh-57911: Posix-flavoured forward-slash path separators in
2724-
# symlink targets aren't sanitized by Windows automaticly,
2725-
# resulting in corrupted links.
2724+
# symlink targets aren't acknowledged by Windows, resulting
2725+
# in corrupted links.
27262726
link_target = link_target.replace("/", os.path.sep)
27272727
os.symlink(link_target, targetpath)
27282728
return

Lib/test/test_tarfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4041,7 +4041,7 @@ def test_absolute_symlink(self):
40414041

40424042
@symlink_test
40434043
@os_helper.skip_unless_symlink
4044-
def test_symlink_target_sanitized_on_windows(self):
4044+
def test_symlink_target_seperator_rewrite_on_windows(self):
40454045
with ArchiveMaker() as arc:
40464046
arc.add('link', symlink_to="relative/test/path")
40474047

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
When extracting tar files on Windows the path of symlink targets will be
2-
sanitized to use backward-slashes as path separator because Posix flavoured
3-
path separators result in corrupted links.
1+
When extracting tar files on Windows Posix flavoured path separators in symlink
2+
targets will be replaced by backward-slashes to prevent corrupted links.

0 commit comments

Comments
 (0)