diff --git a/scripts/startup/bl_operators/userpref.py b/scripts/startup/bl_operators/userpref.py index 1bfcd716ef2..35ad6fb11d2 100644 --- a/scripts/startup/bl_operators/userpref.py +++ b/scripts/startup/bl_operators/userpref.py @@ -674,6 +674,13 @@ class PREFERENCES_OT_addon_install(Operator): return {'CANCELLED'} file_to_extract_root = _zipfile_root_namelist(file_to_extract) + + if "__init__.py" in file_to_extract_root: + self.report({'ERROR'}, rpt_( + "ZIP packaged incorrectly; __init__.py should be in a folder, not at top-level" + )) + return {'CANCELLED'} + if self.overwrite: for f in file_to_extract_root: _module_filesystem_remove(path_addons, f)