Skip to content

Commit

Permalink
fix(fs): Apply requireLiteralLeadingDot config (tauri-apps#1585)
Browse files Browse the repository at this point in the history
* fix(fs): Apply requireLiteralLeadingDot config

* fix deserialization

* reword changefile [skip ci]
  • Loading branch information
FabianLars authored and Sir-Thom committed Oct 22, 2024
1 parent dcbd0f8 commit a336336
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/fix-fs-apply-leading-dot-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"fs": patch
---

Fixed an issue that caused the plugin to ignore the `requireLiteralLeadingDot` config.
2 changes: 1 addition & 1 deletion plugins/fs/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ pub fn resolve_path<R: Runtime>(
.chain(global_scope.denies().iter().map(|e| e.path.clone()))
.chain(command_scope.denies().iter().map(|e| e.path.clone()))
.collect(),
require_literal_leading_dot: None,
require_literal_leading_dot: app.fs_scope().require_literal_leading_dot,
},
)?;

Expand Down
1 change: 1 addition & 0 deletions plugins/fs/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use serde::Deserialize;

#[derive(Deserialize)]
#[serde(rename_all = "camelCase", deny_unknown_fields)]
pub struct Config {
/// Whether or not paths that contain components that start with a `.`
/// will require that `.` appears literally in the pattern; `*`, `?`, `**`,
Expand Down

0 comments on commit a336336

Please sign in to comment.