aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src
diff options
context:
space:
mode:
Diffstat (limited to 'src-tauri/src')
-rw-r--r--src-tauri/src/mod_management/legacy.rs4
-rw-r--r--src-tauri/src/mod_management/mod.rs10
2 files changed, 10 insertions, 4 deletions
diff --git a/src-tauri/src/mod_management/legacy.rs b/src-tauri/src/mod_management/legacy.rs
index cf535000..2a5228fc 100644
--- a/src-tauri/src/mod_management/legacy.rs
+++ b/src-tauri/src/mod_management/legacy.rs
@@ -128,6 +128,10 @@ pub fn parse_installed_mods(
/// Deletes all legacy packages that match in author and mod name
/// regardless of version
+///
+/// "legacy package" refers to a Thunderstore package installed into the `mods` folder
+/// by extracting Northstar mods contained inside and then adding `manifest.json` and `thunderstore_author.txt`
+/// to indicate which Thunderstore package they are part of
pub fn delete_legacy_package_install(
thunderstore_mod_string: &str,
game_install: &GameInstall,
diff --git a/src-tauri/src/mod_management/mod.rs b/src-tauri/src/mod_management/mod.rs
index cef7ff71..c049fe07 100644
--- a/src-tauri/src/mod_management/mod.rs
+++ b/src-tauri/src/mod_management/mod.rs
@@ -444,6 +444,10 @@ fn delete_older_versions(
let ts_mod_string_from_folder: ParsedThunderstoreModString = match folder_name.parse() {
Ok(res) => res,
Err(err) => {
+ // Failed parsing folder name as Thunderstore mod string
+ // This means it doesn't follow the `AUTHOR-MOD-VERSION` naming structure
+ // This folder could've been manually created by the user or another application
+ // As parsing failed we cannot determine the Thunderstore package it is part of hence we skip it
log::warn!("{err}");
continue;
}
@@ -574,13 +578,11 @@ pub async fn fc_download_mod_and_install(
};
// Get directory to install to made up of packages directory and Thunderstore mod string
- let install_directory = format!(
- "{}/R2Northstar/packages/{}",
- game_install.game_path, thunderstore_mod_string
- );
+ let install_directory = format!("{}/R2Northstar/packages/", game_install.game_path);
// Extract the mod to the mods directory
match thermite::core::manage::install_with_sanity(
+ thunderstore_mod_string,
temp_file.file(),
std::path::Path::new(&install_directory),
fc_sanity_check,