Allow icon themes to include icons for plugins

This commit is contained in:
Kovid Goyal 2015-08-20 11:03:00 +05:30
parent 4484c2eb58
commit ec3ca743e8

View File

@ -38,7 +38,7 @@ def read_images_from_folder(path):
name_map = {}
path = os.path.abspath(path)
for filepath in walk(path):
name = os.path.relpath(filepath, path).replace(os.sep, '/').lower()
name = os.path.relpath(filepath, path).replace(os.sep, '/')
ext = name.rpartition('.')[-1]
bname = os.path.basename(name)
if bname.startswith('.') or bname.startswith('_'):
@ -265,7 +265,6 @@ def create_themeball(report):
buf = BytesIO()
with ZipFile(buf, 'w') as zf:
for name, path in report.name_map.iteritems():
if name not in report.extra:
with open(os.path.join(report.path, name), 'rb') as f:
zf.writestr(name, f.read(), compression=ZIP_STORED)
buf.seek(0)