Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
7c068750
Commit
7c068750
authored
Feb 02, 2013
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix translating of illegal characters on Windows (issue #6972).
parent
23298cb7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
Lib/zipfile.py
Lib/zipfile.py
+2
-1
No files found.
Lib/zipfile.py
View file @
7c068750
...
...
@@ -5,6 +5,7 @@ import struct, os, time, sys, shutil
import
binascii
,
cStringIO
,
stat
import
io
import
re
import
string
try
:
import
zlib
# We may need its compression method
...
...
@@ -1052,7 +1053,7 @@ class ZipFile(object):
# filter illegal characters on Windows
if
os
.
path
.
sep
==
'
\
\
'
:
illegal
=
':<>|"?*'
table
=
str
.
maketrans
(
illegal
,
'_'
*
len
(
illegal
))
table
=
str
ing
.
maketrans
(
illegal
,
'_'
*
len
(
illegal
))
arcname
=
arcname
.
translate
(
table
)
targetpath
=
os
.
path
.
join
(
targetpath
,
arcname
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment