Fix shortcuts by using acutal shortcut app_id (#245)

This commit is contained in:
Philip Kristoffersen
2022-10-06 21:44:27 +02:00
committed by GitHub
parent 81e211095b
commit 10093bf3eb
+7 -11
View File
@@ -178,17 +178,13 @@ fn fix_shortcut_icons(
}; };
for shortcut in shortcuts { for shortcut in shortcuts {
if shortcut.is_boilr_shortcut() { let app_id = shortcut.app_id;
let app_id = steam_shortcuts_util::app_id_generator::calculate_app_id( let icon_exsists = Path::new(&shortcut.icon).exists() && !shortcut.icon.is_empty();
&shortcut.exe, for ext in ["ico", "png", "jpg", "webp"] {
&shortcut.app_name, let path = image_folder.join(image_type.file_name(app_id, ext));
); if !icon_exsists && path.exists() {
for ext in ["ico", "png", "jpg", "webp"] { shortcut.icon = format!("\"{}\"", path.to_string_lossy().to_string());
let path = image_folder.join(image_type.file_name(app_id, ext)); break;
if path.exists() {
shortcut.icon = format!("\"{}\"", path.to_string_lossy().to_string());
break;
}
} }
} }
} }