Parcourir la source

feat(core): recursive asset scope on directory file-drop event (#8864)

* allow recursive asset scope on directory file-drop events

* Create allow-recursive-asset-scope-on-file-drop-directory.md

* Update .changes/allow-recursive-asset-scope-on-file-drop-directory.md
i-c-b il y a 1 an
Parent
commit
11a5816bdf

+ 5 - 0
.changes/allow-recursive-asset-scope-on-file-drop-directory.md

@@ -0,0 +1,5 @@
+---
+"tauri": 'patch:enhance'
+---
+
+A file-drop now allows sub-directories recursively when the path is a directory.

+ 1 - 1
core/tauri/src/manager/window.rs

@@ -212,7 +212,7 @@ fn on_window_event<R: Runtime>(
           if path.is_file() {
             let _ = scopes.allow_file(path);
           } else {
-            let _ = scopes.allow_directory(path, false);
+            let _ = scopes.allow_directory(path, true);
           }
         }
         let payload = FileDropPayload { paths, position };