persisted-scope: add some more cfg guards

pull/468/head
FabianLars 2 years ago
parent 413da725f5
commit f5fbd80a5e
No known key found for this signature in database
GPG Key ID: 3B12BC1DEBF61125

@ -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<R: Runtime>() -> TauriPlugin<R> {
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();

Loading…
Cancel
Save