aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src/mod_management/mod.rs
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2023-07-19 01:09:17 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2023-07-19 01:09:17 +0200
commit695858088486a1a9d5fe9a74f79f1cad95a20b14 (patch)
tree788ec40ba9ba1edb947107eaae9fabe91e911852 /src-tauri/src/mod_management/mod.rs
parentea74685ab1f88ad16cef5e58450c28aa120852be (diff)
downloadFlightCore-695858088486a1a9d5fe9a74f79f1cad95a20b14.tar.gz
FlightCore-695858088486a1a9d5fe9a74f79f1cad95a20b14.zip
feat: Delete packages installed in legacy mode
on upgrade
Diffstat (limited to 'src-tauri/src/mod_management/mod.rs')
-rw-r--r--src-tauri/src/mod_management/mod.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src-tauri/src/mod_management/mod.rs b/src-tauri/src/mod_management/mod.rs
index a1a8cdf0..e1939e08 100644
--- a/src-tauri/src/mod_management/mod.rs
+++ b/src-tauri/src/mod_management/mod.rs
@@ -556,6 +556,14 @@ pub async fn fc_download_mod_and_install(
};
// Successful package install
+ match legacy::delete_legacy_package_install(thunderstore_mod_string, game_install) {
+ Ok(()) => (),
+ Err(err) => {
+ log::warn!("Failed deleting legacy versions due to: {}", err);
+ todo!(); // should we do something on error or ignore?
+ }
+ };
+
match delete_older_versions(thunderstore_mod_string, game_install) {
Ok(()) => (),
Err(err) => {