From 2f0e30852acf5d84e65b4ae16fd7c1f5d648c55b Mon Sep 17 00:00:00 2001 From: i-c-b <133848861+i-c-b@users.noreply.github.com> Date: Thu, 15 Feb 2024 09:55:51 -0500 Subject: [PATCH] feat(core): recursive fs scope on directory file-drop event (#954) * allow recursive fs scope on directory file-drop events * Create allow-recursive-fs-scope-on-file-drop-directory.md * Update .changes/allow-recursive-fs-scope-on-file-drop-directory.md --- .changes/allow-recursive-fs-scope-on-file-drop-directory.md | 5 +++++ plugins/fs/src/lib.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changes/allow-recursive-fs-scope-on-file-drop-directory.md diff --git a/.changes/allow-recursive-fs-scope-on-file-drop-directory.md b/.changes/allow-recursive-fs-scope-on-file-drop-directory.md new file mode 100644 index 00000000..e1dfa670 --- /dev/null +++ b/.changes/allow-recursive-fs-scope-on-file-drop-directory.md @@ -0,0 +1,5 @@ +--- +"fs": 'patch' +--- + +A file-drop now allows sub-directories recursively when the path is a directory. diff --git a/plugins/fs/src/lib.rs b/plugins/fs/src/lib.rs index 5bd6545c..2c8843ff 100644 --- a/plugins/fs/src/lib.rs +++ b/plugins/fs/src/lib.rs @@ -120,7 +120,7 @@ pub fn init() -> TauriPlugin> { if path.is_file() { scope.allow_file(path); } else { - scope.allow_directory(path, false); + scope.allow_directory(path, true); } } }