mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 05:53:41 +02:00
Always use icons downloaded
This commit is contained in:
@@ -130,18 +130,14 @@ fn fix_shortcut_icons(
|
|||||||
ImageType::Icon
|
ImageType::Icon
|
||||||
};
|
};
|
||||||
|
|
||||||
for shortcut in shortcuts {
|
for shortcut in shortcuts {
|
||||||
#[cfg(not(target_family = "unix"))]
|
let replace_icon = shortcut.icon.trim().eq("") || !Path::new(shortcut.icon.trim()).exists() || shortcut.icon.eq(&shortcut.exe);
|
||||||
let replace_icon = shortcut.icon.trim().eq("") || !Path::new(shortcut.icon.trim()).exists();
|
|
||||||
#[cfg(target_family = "unix")]
|
|
||||||
let replace_icon = shortcut.icon.trim().eq("") || !Path::new(shortcut.icon.trim()).exists() ||shortcut.icon.eq(&shortcut.exe);
|
|
||||||
if replace_icon {
|
if replace_icon {
|
||||||
let app_id = steam_shortcuts_util::app_id_generator::calculate_app_id(
|
let app_id = steam_shortcuts_util::app_id_generator::calculate_app_id(
|
||||||
&shortcut.exe,
|
&shortcut.exe,
|
||||||
&shortcut.app_name,
|
&shortcut.app_name,
|
||||||
);
|
);
|
||||||
let new_icon_path = image_folder.join(image_type.file_name(app_id));
|
shortcut.icon = image_folder.join(image_type.file_name(app_id)).to_string_lossy().to_string();
|
||||||
shortcut.icon = new_icon_path.to_string_lossy().to_string();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user