refactor(fs): use scope from tauri core (#825)

* fix(fs): scope checks on Android

On Android, when we call canonicalize() on "/data/user/0/appid" (which is the data dir), the result is a "/data/data/appid" path, so we need to adjust our scope for that.

* use scope from core

* update persisted-scope

* fix build

* dev branch
This commit is contained in:
Lucas Fernandes Nogueira
2023-12-19 23:19:01 -03:00
committed by GitHub
parent 1eaf640255
commit 10b80391fc
6 changed files with 19 additions and 454 deletions
+2 -3
View File
@@ -11,22 +11,21 @@
html_favicon_url = "https://github.com/tauri-apps/tauri/raw/dev/app-icon.png"
)]
use config::FsScope;
use tauri::{
plugin::{Builder as PluginBuilder, TauriPlugin},
scope::fs::Scope,
utils::config::FsScope,
FileDropEvent, Manager, RunEvent, Runtime, WindowEvent,
};
mod commands;
mod config;
mod error;
mod scope;
#[cfg(feature = "watch")]
mod watcher;
pub use config::Config;
pub use error::Error;
pub use scope::{Event as ScopeEvent, Scope};
type Result<T> = std::result::Result<T, Error>;