mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-26 21:41:48 +02:00
Update lib.rs
This commit is contained in:
@@ -56,15 +56,15 @@ pub fn init<R: Runtime>() -> TauriPlugin<R> {
|
|||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
for allowed in scope.allowed_paths {
|
for allowed in scope.allowed_paths {
|
||||||
// allows the path as is
|
// allows the path as is
|
||||||
let _ = fs_scope.allow_file(allowed);
|
let _ = fs_scope.allow_file(&allowed);
|
||||||
#[cfg(feature = "protocol-asset")]
|
#[cfg(feature = "protocol-asset")]
|
||||||
let _ = asset_protocol_scope.allow_file(allowed);
|
let _ = asset_protocol_scope.allow_file(&allowed);
|
||||||
}
|
}
|
||||||
for forbidden in scope.forbidden_patterns {
|
for forbidden in scope.forbidden_patterns {
|
||||||
// forbid the path as is
|
// forbid the path as is
|
||||||
let _ = fs_scope.forbid_file(forbidden);
|
let _ = fs_scope.forbid_file(&forbidden);
|
||||||
#[cfg(feature = "protocol-asset")]
|
#[cfg(feature = "protocol-asset")]
|
||||||
let _ = asset_protocol_scope.forbid_file(forbidden);
|
let _ = asset_protocol_scope.forbid_file(&forbidden);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user