mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 05:53:41 +02:00
Fix bug where epic games would doulbe
This commit is contained in:
@@ -40,8 +40,11 @@ pub(crate) fn get_egs_manifests(
|
|||||||
.filter_map(|dir| dir.ok())
|
.filter_map(|dir| dir.ok())
|
||||||
.filter_map(get_manifest_item)
|
.filter_map(get_manifest_item)
|
||||||
.filter(is_game_installed)
|
.filter(is_game_installed)
|
||||||
.filter(is_game_launchable);
|
.filter(is_game_launchable);
|
||||||
Ok(manifests.collect())
|
let mut manifests : Vec<ManifestItem> = manifests.collect();
|
||||||
|
manifests.sort_by_key(|m| format!("{}-{}-{}",m.install_location,m.launch_executable,m.is_managed));
|
||||||
|
manifests.dedup_by_key(|m| format!("{}-{}-{}",m.install_location,m.launch_executable,m.is_managed));
|
||||||
|
Ok(manifests)
|
||||||
}
|
}
|
||||||
Err(err) => Err(ReadDirError {
|
Err(err) => Err(ReadDirError {
|
||||||
error: err,
|
error: err,
|
||||||
@@ -50,6 +53,7 @@ pub(crate) fn get_egs_manifests(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn get_manifest_dir_path(
|
fn get_manifest_dir_path(
|
||||||
settings: &EpicGamesLauncherSettings,
|
settings: &EpicGamesLauncherSettings,
|
||||||
) -> Result<String, EpicGamesManifestsError> {
|
) -> Result<String, EpicGamesManifestsError> {
|
||||||
|
|||||||
@@ -35,15 +35,14 @@ pub(crate) struct ManifestItem {
|
|||||||
|
|
||||||
fn exe_shortcut(manifest: ManifestItem) -> ShortcutOwned {
|
fn exe_shortcut(manifest: ManifestItem) -> ShortcutOwned {
|
||||||
let exe = manifest.exe();
|
let exe = manifest.exe();
|
||||||
let mut start_dir = manifest.install_location.clone();
|
let start_dir = manifest.install_location.clone();
|
||||||
if !manifest.install_location.starts_with('"') {
|
let exe = exe.trim_matches('\"');
|
||||||
start_dir = format!("\"{}\"", manifest.install_location);
|
let start_dir = start_dir.trim_matches('\"');
|
||||||
}
|
|
||||||
Shortcut::new(
|
Shortcut::new(
|
||||||
0,
|
0,
|
||||||
manifest.display_name.as_str(),
|
manifest.display_name.as_str(),
|
||||||
exe.as_str(),
|
exe,
|
||||||
start_dir.as_str(),
|
start_dir,
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
"",
|
"",
|
||||||
|
|||||||
Reference in New Issue
Block a user