tauri-apps / tauri-apps/plugins-workspace

opener plugin docs missing mention of requireLiteralLeadingDot

Open
#2,748 6 comments 0 reactions 0 assignees View on GitHub
plugin: opener type: documentation
Dominant language
Rust
Stars
1.8k
Forks
602
Avg merge
4d 14h
Merged PRs (30d)
9

Description

For context, I open a PDF file by the path returned from the backend. The backend uses [`platform_dirs::AppDirs`](https://docs.rs/platform-dirs/latest/platform_dirs/struct.AppDirs.html#impl-AppDirs) with `use_xdg_on_macos` being `true`. The frontend receives a path that looks like `/Users/user/.local/share/app/file.pdf`. It starts to work only if to move the file outside the `.local` folder.

### Code

```ts
openPath("/Users/user/.local/share/app/file.pdf"); // Error
openPath("/Users/user/.local/share/file.pdf"); // Error
openPath("/Users/user/.local/file.pdf"); // Error
openPath("/Users/user/file.pdf"); // No error
```

### Error

`Not allowed to open path /Users/user/.local/share/app/file.pdf`

### Permission

```json
{
"identifier": "opener:allow-open-path",
"allow": [{ "path": "**/*.pdf" }]
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.