fix(core): remove $APP from fs scope default

This commit is contained in:
Lucas Nogueira 2022-01-28 20:05:51 -03:00
parent 645b5a8b8a
commit ff37a715ab
No known key found for this signature in database
GPG Key ID: 2714B66BCFB01F7F

View File

@ -599,16 +599,10 @@ macro_rules! check_feature {
/// The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`,
/// `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`,
/// `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$CWD`.
#[derive(Debug, PartialEq, Clone, Deserialize, Serialize)]
#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]
pub struct FsAllowlistScope(pub Vec<PathBuf>);
impl Default for FsAllowlistScope {
fn default() -> Self {
Self(vec!["$APP/**".into()])
}
}
/// Allowlist for the file system APIs.
#[derive(Debug, Default, PartialEq, Clone, Deserialize, Serialize)]
#[cfg_attr(feature = "schema", derive(JsonSchema))]