Skip to content

Commit

Permalink
Always use icons downloaded
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipK committed Apr 13, 2022
1 parent 4fb28b3 commit e30e07a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/sync/synchronization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,14 @@ fn fix_shortcut_icons(
ImageType::Icon
};

for shortcut in shortcuts {
#[cfg(not(target_family = "unix"))]
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);
for shortcut in shortcuts {
let replace_icon = shortcut.icon.trim().eq("") || !Path::new(shortcut.icon.trim()).exists() || shortcut.icon.eq(&shortcut.exe);
if replace_icon {
let app_id = steam_shortcuts_util::app_id_generator::calculate_app_id(
&shortcut.exe,
&shortcut.app_name,
);
let new_icon_path = image_folder.join(image_type.file_name(app_id));
shortcut.icon = new_icon_path.to_string_lossy().to_string();
shortcut.icon = image_folder.join(image_type.file_name(app_id)).to_string_lossy().to_string();
}
}
}
Expand Down

0 comments on commit e30e07a

Please sign in to comment.