Closed thewh1teagle closed 7 months ago
fs.readDir throwed path not allowed on the configured scope: ...
fs.readDir
path not allowed on the configured scope: ...
I found a workround with help in discord, but I think it's still worth an issue
Reason: dot paths in Linux Solution:
"scope": { "allow": ["**"], "requireLiteralLeadingDot": false }
Use fs.readDir in Linux with scope configured to **
Linux
**
It should read it, but it throws error
tauri info
[✔] Environment - OS: Ubuntu 22.04 X64 ✔ webkit2gtk-4.0: 2.42.4 ✔ rsvg2: 2.52.5 ✔ rustc: 1.75.0 (82e1608df 2023-12-21) ✔ cargo: 1.75.0 (1d8b05cdd 2023-11-20) ✔ rustup: 1.26.0 (5af9b9484 2023-04-05) ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (environment override by RUSTUP_TOOLCHAIN) - node: 20.7.0 - npm: 10.1.0 - bun: 1.0.3 [-] Packages - tauri [RUST]: 1.5.4 - tauri-build [RUST]: 1.5.1 - wry [RUST]: 0.24.7 - tao [RUST]: 0.16.5 - tauri-cli [RUST]: 1.5.9 - @tauri-apps/api : not installed! - @tauri-apps/cli [NPM]: 1.5.9 [-] App - build-type: bundle - CSP: unset - distDir: ../dist - devPath: http://localhost:1420/ - framework: React
No response
Ubuntu 22.04, Wayland https://discord.com/channels/616186924390023171/1198765010558664704
Ubuntu 22.04
Wayland
This is the expected behavior, you need to opt into reading dot files by specifying requireLiteralLeadingDot: false or configure your glob pattern to include the dot.
requireLiteralLeadingDot: false
Describe the bug
fs.readDir
throwedpath not allowed on the configured scope: ...
I found a workround with help in discord, but I think it's still worth an issue
Reason: dot paths in Linux Solution:
Reproduction
Use
fs.readDir
inLinux
with scope configured to**
Expected behavior
It should read it, but it throws error
Full
tauri info
outputStack trace
No response
Additional context
Ubuntu 22.04
,Wayland
https://discord.com/channels/616186924390023171/1198765010558664704