[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35794] trunk/blender/release/scripts/ startup/bl_ui/space_userpref.py: Fix for Mac addon install, unzipping could create __MACOSX folder which
Brecht Van Lommel
brechtvanlommel at pandora.be
Sat Mar 26 09:41:21 CET 2011
Revision: 35794
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35794
Author: blendix
Date: 2011-03-26 08:41:21 +0000 (Sat, 26 Mar 2011)
Log Message:
-----------
Fix for Mac addon install, unzipping could create __MACOSX folder which
we don't need, just remove it if it gets created.
Modified Paths:
--------------
trunk/blender/release/scripts/startup/bl_ui/space_userpref.py
Modified: trunk/blender/release/scripts/startup/bl_ui/space_userpref.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_userpref.py 2011-03-26 08:28:24 UTC (rev 35793)
+++ trunk/blender/release/scripts/startup/bl_ui/space_userpref.py 2011-03-26 08:41:21 UTC (rev 35794)
@@ -1100,6 +1100,12 @@
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'}
More information about the Bf-blender-cvs
mailing list