Fix a possible problem with paths inside .egg on Windows.

This commit is contained in:
Dmitry Trofimov
2014-11-13 22:47:19 +01:00
parent 84b794297f
commit e34d909b49

View File

@@ -119,7 +119,7 @@ def _NormFile(filename):
if r[ind] == "!":
ind+=1
inner_path = r[ind:]
if inner_path.startswith('/'):
if inner_path.startswith('/') or inner_path.startswith('\\'):
inner_path = inner_path[1:]
r = zip_path + "/" + inner_path
@@ -152,7 +152,7 @@ def exists(file):
return None
try:
if inner_path.startswith('/'):
if inner_path.startswith('/') or inner_path.startswith('\\'):
inner_path = inner_path[1:]
info = zip.getinfo(inner_path)