Skip to content

Commit 75b6685

Browse files
committed
Perform path normalization in TarFile.extractall()
1 parent aa8578d commit 75b6685

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

Lib/tarfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2437,6 +2437,7 @@ def extractall(self, path=".", members=None, *, numeric_owner=False,
24372437
'excluded by filter')
24382438
continue
24392439
dirpath = os.path.join(path, tarinfo.name)
2440+
dirpath = os.path.normpath(dirpath)
24402441
try:
24412442
lstat = os.lstat(dirpath)
24422443
except FileNotFoundError:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add path normalization to `TarFile.extractall()`.

0 commit comments

Comments
 (0)