diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2023-07-22 16:29:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-22 16:29:41 +0200 |
commit | ec3750c759f8d1d57d04d30b3bee8e38a5c3db18 (patch) | |
tree | 257e7fdd0a64f1a16ea87181c6aab0d833620b53 | |
parent | a2b450da8588dba67ecedef557bd8d1111c1ff4f (diff) | |
download | FlightCore-ec3750c759f8d1d57d04d30b3bee8e38a5c3db18.tar.gz FlightCore-ec3750c759f8d1d57d04d30b3bee8e38a5c3db18.zip |
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
-rw-r--r-- | src-tauri/src/mod_management/mod.rs | 9 |
1 files changed, 9 insertions, 0 deletions
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 |