[bug] dialog.open and convertFileSrc breaks if file name or path contains [ #5234
Labels
scope: core
Core packages of Tauri
status: backlog
Issue is ready and we can work on it
status: needs triage
This issue needs to triage, applied to new issues
type: bug
Describe the bug
Using dialog.open, if the file or file path opened contains
[
(eg../pictures/img[test.jpeg
, or./pictures/te[st/img.jpeg
)it will result in the following error:
invalid glob pattern: Pattern syntax error near position 30: invalid range pattern
If the file path closes the
[
(eg../pictures/img[test].jpeg
or even./pictures/te[st/img].jpeg
)it opens the file as expected, but breaks when trying to display said file, resulting in the following error:
asset protocol not configured to allow the path: C:\...\img[test].jpeg
Other files open and display as expected.
Reproduction
Expected behavior
The files will be opened and displayed just like the others
Platform and versions
Environment
› OS: Windows 10.0.19044 X64
› Webview2: 105.0.1343.42
› MSVC:
- Visual Studio Community 2019
› Node.js: 16.15.1
› npm: 8.11.0
› pnpm: Not installed!
› yarn: 1.22.19
› rustup: 1.25.1
› rustc: 1.63.0
› cargo: 1.63.0
› Rust toolchain: stable-x86_64-pc-windows-msvc
Packages
› @tauri-apps/cli [NPM]: 1.1.1
› @tauri-apps/api [NPM]: 1.1.0
› tauri [RUST]: 1.0.5,
› tauri-build [RUST]: 1.0.4,
› tao [RUST]: 0.12.2,
› wry [RUST]: 0.19.0,
App
› build-type: bundle
› CSP: unset
› distDir: ../dist
› devPath: http://localhost:1420/
› framework: Vue.js
App directory structure
├─ .vscode
├─ node_modules
├─ public
├─ src
└─ src-tauri
Stack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: