Skip to content

Commit

Permalink
Fix two small issue (#246)
Browse files Browse the repository at this point in the history
Signed-off-by: Aisuko <[email protected]>

Signed-off-by: Aisuko <[email protected]>
  • Loading branch information
Aisuko authored Oct 7, 2022
1 parent 10093bf commit fac5880
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/sync/synchronization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ fn fix_shortcut_icons(
for ext in ["ico", "png", "jpg", "webp"] {
let path = image_folder.join(image_type.file_name(app_id, ext));
if !icon_exsists && path.exists() {
shortcut.icon = format!("\"{}\"", path.to_string_lossy().to_string());
shortcut.icon = format!("\"{}\"", path.to_string_lossy());
break;
}
}
Expand Down
38 changes: 19 additions & 19 deletions src/ui/ui_import_games.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,25 +185,25 @@ fn to_shortcut_owned(shortcuts_to_import: Vec<(String, Vec<ShortcutToImport>)>)
}


#[cfg(target_family = "unix")]
fn setup_proton<'a, I>(shortcut_infos: I)
where I: IntoIterator<Item = &'a (String,Vec<ShortcutToImport>)>
{
let mut shortcuts_to_proton = vec![];
#[cfg(target_family = "unix")]
fn setup_proton<'a, I>(shortcut_infos: I)
where
I: IntoIterator<Item = &'a (String,Vec<ShortcutToImport>)>{
let mut shortcuts_to_proton = vec![];

for (name,shortcuts) in shortcut_infos {
for shortcut_info in shortcuts{
if shortcut_info.needs_proton {
crate::sync::symlinks::ensure_links_folder_created(&name);
}
if shortcut_info.needs_proton {
shortcuts_to_proton.push(format!("{}", shortcut_info.shortcut.app_id));
}
for (name,shortcuts) in shortcut_infos {
for shortcut_info in shortcuts{
if shortcut_info.needs_proton {
crate::sync::symlinks::ensure_links_folder_created(name);
}
if shortcut_info.needs_proton {
shortcuts_to_proton.push(format!("{}", shortcut_info.shortcut.app_id));
}

if shortcut_info.needs_symlinks {
crate::sync::symlinks::create_sym_links(&shortcut_info.shortcut);
}
}
setup_proton_games(&shortcuts_to_proton);
if shortcut_info.needs_symlinks {
crate::sync::symlinks::create_sym_links(&shortcut_info.shortcut);
}
}
setup_proton_games(&shortcuts_to_proton);
}
}
}

0 comments on commit fac5880

Please sign in to comment.