From 610ea414c152c164b3100e31c9429d2074d81d91 Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Thu, 29 Jun 2023 02:01:22 +0200 Subject: [PATCH] expose tauri fs api --- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 30ad48de..b7401f85 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -17,7 +17,7 @@ tauri-build = { version = "1.4.0", features = [] } [dependencies] serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } -tauri = { version = "1.4.0", features = [] } +tauri = { version = "1.4.0", features = ["fs-all"] } [features] # this feature is used for production builds or when `devPath` points to the filesystem and the built-in dev server is disabled. diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 5392007f..429415c8 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -4,7 +4,8 @@ "beforeBuildCommand": "npm run build", "beforeDevCommand": "npm run dev", "devPath": "http://localhost:3000", - "distDir": "../website/dist" + "distDir": "../website/dist", + "withGlobalTauri": true }, "package": { "productName": "Strudel", @@ -12,7 +13,11 @@ }, "tauri": { "allowlist": { - "all": false + "all": false, + "fs": { + "all": true, + "scope": ["$AUDIO/**", "$AUDIO"] + } }, "bundle": { "active": true,