From f5fbd80a5ef3f2fa5f5fa925e9adc7c53ffa36ec Mon Sep 17 00:00:00 2001 From: FabianLars Date: Mon, 10 Jul 2023 23:02:36 +0200 Subject: [PATCH] persisted-scope: add some more cfg guards --- plugins/persisted-scope/src/lib.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/persisted-scope/src/lib.rs b/plugins/persisted-scope/src/lib.rs index 269f1973..81cc8f57 100644 --- a/plugins/persisted-scope/src/lib.rs +++ b/plugins/persisted-scope/src/lib.rs @@ -15,8 +15,10 @@ use aho_corasick::AhoCorasick; use serde::{Deserialize, Serialize}; use tauri::{ plugin::{Builder, TauriPlugin}, - FsScope, FsScopeEvent, GlobPattern, Manager, Runtime, + GlobPattern, Manager, Runtime, }; +#[cfg(feature = "protocol-asset")] +use tauri::{FsScope, FsScopeEvent}; use tauri_plugin_fs::{FsExt, Scope as FsPluginScope, ScopeEvent as FsPluginScopeEvent}; use std::{ @@ -231,6 +233,7 @@ pub fn init() -> TauriPlugin { Builder::new("persisted-scope") .setup(|app, _api| { let fs_scope = app.try_fs_scope(); + #[cfg(feature = "protocol-asset")] let asset_protocol_scope = app.asset_protocol_scope(); let app = app.clone(); let app_dir = app.path().app_data_dir();