aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src/mod_management/mod.rs
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2023-07-18 16:12:28 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2023-07-18 16:12:28 +0200
commitfb8cfbf418568c31fd34f276ace2949bfb753b2c (patch)
tree9aaf7af4fc81f86207a072e181a56e2ed951b3c3 /src-tauri/src/mod_management/mod.rs
parent7df3de912e50d174a8ea33a0e8c3bf397cd85a0a (diff)
parent6d0d813c9af9fb43e2732652c5ec14d914dcea42 (diff)
downloadFlightCore-fb8cfbf418568c31fd34f276ace2949bfb753b2c.tar.gz
FlightCore-fb8cfbf418568c31fd34f276ace2949bfb753b2c.zip
Merge remote-tracking branch 'origin/feat/install-packages' into dev/packages
Diffstat (limited to 'src-tauri/src/mod_management/mod.rs')
-rw-r--r--src-tauri/src/mod_management/mod.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/src-tauri/src/mod_management/mod.rs b/src-tauri/src/mod_management/mod.rs
index d0ce3476..c9b7ae0c 100644
--- a/src-tauri/src/mod_management/mod.rs
+++ b/src-tauri/src/mod_management/mod.rs
@@ -421,7 +421,6 @@ pub async fn fc_download_mod_and_install(
"{}/___flightcore-temp-download-dir/",
game_install.game_path
);
- let mods_directory = format!("{}/R2Northstar/mods/", game_install.game_path);
// Early return on empty string
if thunderstore_mod_string.is_empty() {
@@ -486,14 +485,16 @@ pub async fn fc_download_mod_and_install(
Err(err) => return Err(err.to_string()),
};
- // Get Thunderstore mod author
- let author = thunderstore_mod_string.split('-').next().unwrap();
+ // 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
+ );
// Extract the mod to the mods directory
match thermite::core::manage::install_mod(
- author,
temp_file.file(),
- std::path::Path::new(&mods_directory),
+ std::path::Path::new(&install_directory),
) {
Ok(_) => (),
Err(err) => {