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 rand::prelude::*;
|
||||||
use rusqlite::{types::ToSqlOutput, Connection, ToSql};
|
use rusqlite::{types::ToSqlOutput, Connection, ToSql};
|
||||||
use tauri::{Manager, State};
|
use tauri::{Manager, State};
|
||||||
|
use tauri_plugin_fs::FsExt;
|
||||||
use tokio::sync::Mutex;
|
use tokio::sync::Mutex;
|
||||||
|
|
||||||
mod app_state;
|
mod app_state;
|
||||||
|
@ -98,9 +99,11 @@ pub fn run() {
|
||||||
.plugin(tauri_plugin_fs::init())
|
.plugin(tauri_plugin_fs::init())
|
||||||
.setup(|app| {
|
.setup(|app| {
|
||||||
app.manage(Mutex::new(state));
|
app.manage(Mutex::new(state));
|
||||||
|
let scope = app.fs_scope();
|
||||||
|
let path = app.path();
|
||||||
|
scope.allow_directory(path.temp_dir()?, false)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
.plugin(tauri_plugin_opener::init())
|
|
||||||
.invoke_handler(tauri::generate_handler![
|
.invoke_handler(tauri::generate_handler![
|
||||||
swap,
|
swap,
|
||||||
count,
|
count,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue