aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2022-11-13 15:43:22 +0100
committerGitHub <noreply@github.com>2022-11-13 15:43:22 +0100
commitefd4afaaa68fc9168b71cb0a8049ca38a8ed8d79 (patch)
tree4fde84e041f690c8f5f13bce028e419a308fc1d2 /src-tauri/src
parentfa25001d7f2a1962de8990f077f7f1601679a292 (diff)
downloadFlightCore-efd4afaaa68fc9168b71cb0a8049ca38a8ed8d79.tar.gz
FlightCore-efd4afaaa68fc9168b71cb0a8049ca38a8ed8d79.zip
chore: Bump libthermite version to 0.3.3 (#49)
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 {