Allowlist temp dir

This commit is contained in:
Bianca Fürstenau 2025-02-12 04:58:14 +01:00
parent d7d6a32334
commit 8dd046b22d

View file

@ -2,6 +2,7 @@ use chrono::offset::Utc;
use rand::prelude::*;
use rusqlite::{types::ToSqlOutput, Connection, ToSql};
use tauri::{Manager, State};
use tauri_plugin_fs::FsExt;
use tokio::sync::Mutex;
mod app_state;
@ -98,9 +99,11 @@ pub fn run() {
.plugin(tauri_plugin_fs::init())
.setup(|app| {
app.manage(Mutex::new(state));
let scope = app.fs_scope();
let path = app.path();
scope.allow_directory(path.temp_dir()?, false)?;
Ok(())
})
.plugin(tauri_plugin_opener::init())
.invoke_handler(tauri::generate_handler![
swap,
count,