aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src/mod_management/mod.rs
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2023-07-23 23:32:59 +0200
committerGitHub <noreply@github.com>2023-07-23 23:32:59 +0200
commitdac7b0b18ab5a36d3a25154108e9acecc6c5fe93 (patch)
tree9475ffa7d856991e1bd3d88a4950962869d42a8e /src-tauri/src/mod_management/mod.rs
parent031ced476c38d08f7bec5312c16d1343a24e2469 (diff)
downloadFlightCore-dac7b0b18ab5a36d3a25154108e9acecc6c5fe93.tar.gz
FlightCore-dac7b0b18ab5a36d3a25154108e9acecc6c5fe93.zip
feat: Add basic warning on plugin install (#441)
Plugins in Northstar have unrestricted device access. As such we want to warn user before installing one with an option to abort.
Diffstat (limited to 'src-tauri/src/mod_management/mod.rs')
-rw-r--r--src-tauri/src/mod_management/mod.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src-tauri/src/mod_management/mod.rs b/src-tauri/src/mod_management/mod.rs
index 0d4edd87..879d3b04 100644
--- a/src-tauri/src/mod_management/mod.rs
+++ b/src-tauri/src/mod_management/mod.rs
@@ -12,6 +12,7 @@ use std::string::ToString;
use std::{fs, path::PathBuf};
mod legacy;
+mod plugins;
use crate::GameInstall;
#[derive(Debug, Clone)]
@@ -498,8 +499,10 @@ 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
+ log::warn!("Plugin detected, prompting user");
+ if !plugins::plugin_prompt() {
+ return false; // Plugin detected and user denied install
+ }
}
}
}