Fix bug where epic games would doulbe

This commit is contained in:
Philip
2022-03-21 22:09:40 +01:00
parent b4dbcdd29c
commit 52791fb43f
2 changed files with 11 additions and 8 deletions
+6 -2
View File
@@ -40,8 +40,11 @@ pub(crate) fn get_egs_manifests(
.filter_map(|dir| dir.ok())
.filter_map(get_manifest_item)
.filter(is_game_installed)
.filter(is_game_launchable);
Ok(manifests.collect())
.filter(is_game_launchable);
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 {
error: err,
@@ -50,6 +53,7 @@ pub(crate) fn get_egs_manifests(
}
}
fn get_manifest_dir_path(
settings: &EpicGamesLauncherSettings,
) -> Result<String, EpicGamesManifestsError> {