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
This commit is contained in:
i-c-b 2024-02-15 09:56:04 -05:00 committed by GitHub
parent 3cee26a58a
commit 11a5816bdf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

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

View File

@ -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 };