aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src
diff options
context:
space:
mode:
Diffstat (limited to 'src-tauri/src')
-rw-r--r--src-tauri/src/lib.rs6
-rw-r--r--src-tauri/src/main.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index 79c5165e..4e49c3f9 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -207,7 +207,7 @@ fn extract(zip_file: std::fs::File, target: &std::path::Path) -> Result<()> {
///Install N* from the provided mod
///
///Checks cache, else downloads the latest version
-async fn do_install(nmod: &thermite::model::Mod, game_path: &std::path::Path) -> Result<()> {
+async fn do_install(nmod: &thermite::model::ModVersion, game_path: &std::path::Path) -> Result<()> {
let filename = format!("northstar-{}.zip", nmod.version);
let download_directory = format!("{}/___flightcore-temp-download-dir/", game_path.display());
@@ -254,11 +254,11 @@ pub async fn install_northstar(
.ok_or_else(|| panic!("Couldn't find Northstar on thunderstore???"))
.unwrap();
- do_install(nmod, std::path::Path::new(game_path))
+ do_install(nmod.versions.get(&nmod.latest).unwrap(), std::path::Path::new(game_path))
.await
.unwrap();
- Ok(nmod.version.clone())
+ Ok(nmod.latest.clone())
}
/// Returns identifier of host OS FlightCore is running on
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs
index ad5842f4..1ac41684 100644
--- a/src-tauri/src/main.rs
+++ b/src-tauri/src/main.rs
@@ -193,7 +193,7 @@ async fn check_is_northstar_outdated(
// Release candidate version numbers are different between `mods.json` and Thunderstore
let version_number = convert_release_candidate_number(version_number);
- if version_number != nmod.version {
+ if version_number != nmod.latest {
println!("Installed Northstar version outdated");
Ok(true)
} else {