-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
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
- Prepare test files matching the above examples
- Create a project
- Add file dialog, convert path with convertFileSrc, and set to img src
- Try opening and displaying the files
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