mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 16:54:22 +00:00
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:
1 parent
4762d4d8ef
commit
6370c242f0
1 file changed
+4
-1
+4
-1
@@ -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')
|
||||
|
||||
Reference in new issue
Block a user