[HOTFIX] Fixed that the icon cannot be found (#2265)

fixed that the icon cannot be found when the suffix name is uppercase
This commit is contained in:
ohyeah521
2023-09-13 00:06:21 -07:00
committed by GitHub
parent 80639f42f4
commit 9e92980f6a
@@ -230,7 +230,8 @@ def get_icon_apk(apk, app_dic):
if icon_file:
src = Path(icon_file)
# Copy PNG/SVG to Downloads
out = Path(settings.DWD_DIR) / (app_dic['md5'] + '-icon' + src.suffix)
icon = app_dic['md5'] + '-icon' + src.suffix.lower()
out = Path(settings.DWD_DIR) / icon
if src and src.exists() and src.is_file():
copy2(src.as_posix(), out.as_posix())
app_dic['icon_path'] = out.name