OS X's python 2.6.1 has a bug in zipfile.extractall that makes it unzip directories as regular files. So switch to extract

This commit is contained in:
LexManos committed 2013-03-13 13:11:43 -07:00
1 parent 4762d4d8ef
commit 6370c242f0
1 file changed
+4 -1
+4 -1
View File
@@ -630,7 +630,10 @@ def download_mcp(mcp_dir, fml_dir, version=None):
print 'Extracting MCP to \'%s\'' % mcp_dir
zf = ZipFile(mcp_zip)
zf.extractall(mcp_dir)
#OS X's python 2.6.1 extractall has a bug in zipfile that makes it unzip directories as regular files.
for path in zf.namelist():
if not path.endswith('/'):
zf.extract(path, mcp_dir)
zf.close()
eclipse_dir = os.path.join(mcp_dir, 'eclipse')