From ec3750c759f8d1d57d04d30b3bee8e38a5c3db18 Mon Sep 17 00:00:00 2001 From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> Date: Sat, 22 Jul 2023 16:29:41 +0200 Subject: feat: Prevent mods with plugins to be installed (#438) This is a temporary measure until a proper implementation exists that properly warns user before installing plugin --- src-tauri/src/mod_management/mod.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src-tauri') diff --git a/src-tauri/src/mod_management/mod.rs b/src-tauri/src/mod_management/mod.rs index c049fe07..0d4edd87 100644 --- a/src-tauri/src/mod_management/mod.rs +++ b/src-tauri/src/mod_management/mod.rs @@ -494,6 +494,15 @@ fn fc_sanity_check(input: &&fs::File) -> bool { } } } + + if file_path.starts_with("plugins/") { + if let Some(name) = file_path.file_name() { + if name.to_str().unwrap().contains(".dll") { + log::warn!("Plugin detected, skipping"); + return false; // We disallow plugins for now + } + } + } } has_mods && mod_json_exists -- cgit v1.2.3