Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 65bc20c

Browse files
committed
Normalize paths before writing them to a zipfile.
1 parent 4b46ef9 commit 65bc20c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/distutils/archive_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def make_zipfile (base_name, base_dir, verbose=0, dry_run=0):
9393

9494
def visit (z, dirname, names):
9595
for name in names:
96-
path = os.path.join (dirname, name)
96+
path = os.path.normpath(os.path.join(dirname, name))
9797
if os.path.isfile (path):
9898
z.write (path, path)
9999

0 commit comments

Comments
 (0)