Allowlist temp dir
This commit is contained in:
parent
d7d6a32334
commit
8dd046b22d
1 changed files with 4 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue