Dont allow icon themes to override blank.png

This commit is contained in:
Kovid Goyal 2015-09-01 14:16:26 +05:30
parent 94f3ba68bf
commit 8d9db8969d

View File

@ -90,6 +90,7 @@ def read_theme_from_folder(path):
current_image_map = read_images_from_folder(P('images', allow_user_override=False))
name_map = read_images_from_folder(path)
name_map.pop(THEME_COVER, None)
name_map.pop('blank.png', None)
current_names = frozenset(current_image_map)
names = frozenset(name_map)
extra = names - current_names
@ -701,7 +702,7 @@ def install_icon_theme(theme, f):
metadata_file = os.path.join(icdir, 'icon-theme.json')
with ZipFile(f) as zf:
for name in zf.namelist():
if '..' in name:
if '..' in name or name == 'blank.png':
continue
base = icdir
if '/' in name: