Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-03-26 11:41:21 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-03-26 11:41:21 +0300
commit76fd7a90ad3ef898706742fb7d68eabcdfd80413 (patch)
treee4b0f5bff504952ad048120e13274cb6f445fcc8 /release
parent63e40dbe0e4fcee2f96eb0f16bc511e019e0d509 (diff)
Fix for Mac addon install, unzipping could create __MACOSX folder which
we don't need, just remove it if it gets created.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index c79caf78b4b..67174db1d3d 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -1100,6 +1100,12 @@ class WM_OT_addon_install(bpy.types.Operator):
try: # extract the file to "addons"
file_to_extract.extractall(path_addons)
+
+ # zip files can create this dir with metadata, don't need it
+ macosx_dir = os.path.join(path_addons, '__MACOSX')
+ if os.path.isdir(macosx_dir):
+ shutil.rmtree(macosx_dir)
+
except:
traceback.print_exc()
return {'CANCELLED'}