Capabilities (tauri.conf.json):
"opener:allow-open-path",
{
"identifier": "opener:allow-open-path",
"allow": [
{
"path": "**"
},
{
"path": "$APPDATA/**"
},
{
"path": "$LOCALDATA/**"
}
]
},
Code (TypeScript):
console.log('Parent directory:', parentDir);
await openPath(parentDir);
Console Output:
Parent directory: C:/Users/zonedetec/AppData/Roaming/com.qurancaption/assets
Problem Description
When I call openPath(parentDir) in my Tauri app:
- The file explorer first opens the "Documents" folder, which is not the target directory.
- Then, after a delay of about 10–15 seconds, a second file explorer window opens, this time to the correct directory (
AppData/Roaming/com.qurancaption/assets).
This behavior is unexpected and confusing. I’m not calling openPath() twice, yet two windows appear, with a noticeable delay between them.
Questions
- Why is the first file explorer window opening to the wrong location?
- Why is there a second window opening after a delay — and why is it correct?
- Is this a bug in Tauri, a misconfiguration in my
tauri.conf.json, or something else?
Thanks in advance for your help!