-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] path not allowed on the configured scope #6964
Comments
Can you try deleting the |
Ok, with "scope": ["*", "$APP", "$APP/*", "$CACHE", "$CACHE/*", "$CONFIG", "$CONFIG/*", "$LOG", "$LOG/*", "$HOME/*"] I managed to be able to read the most of the file/directory paths with the following setting with "scope": ["**", "$APP", "$APP/**", "$CACHE", "$CACHE/**", "$CONFIG", "$CONFIG/**", "$LOG", "$LOG/**", "$HOME/**"] It was not enough to just provide "scope": ["**"] which would still not allow to read the application's related However I still can NOT read any text file which contains leading //pseudocode
import { readTextFile } from '@tauri-apps/api/fs';
await readTextFile('/home/user/Downloads/create-this-exact/.filename.txt');//will complain about path not allowed on the configured scope Here is reproduction repo, clone it, create text file at |
Ahh, so it's with a leading dot. I think this is part of this issue then: #6158 |
Looks like it. It does not matter whether the leading dot is in the filename or in the directory name somewhere in the path. Also one breaking change since |
to match the hidden directories or files, you need to explicitly match the dot, for your use-case you need to define the scope like this: "scope": ["$DOWNLOAD/create-this-exact/.*", "$DOWNLOAD/create-this-exact/*"]
I wouldn't consider it a breaking change since it was invalid behavior in the first place and needed to be fixed. |
Thanks @amrbashir The path in the actual application is dynamic and is not known beforehand. So I need to set wildcard scope as well. |
I have brought this issue to the team and we will be discussing how to enable this, probably it will be behind a setting in |
… in Tauri Fixes an issue where Takma would crash upon startup on Linux, because hidden folders i.e. folders starting with a dot weren't being matched by the `**` glob pattern defined in Tauri's config file under `fs.scope.allow`. This crash only occurred on Linux because the [`requireLiteralLeadingDot`](https://tauri.app/v1/api/config/#fsallowlistscope.requireliteralleadingdot) setting defaults to `true` on Unix-based systems, while defaulting to `false` on Windows. Related issues: - tauri-apps/tauri#6964 - tauri-apps/tauri#6158 - tauri-apps/tauri#7190
Describe the bug
While having installed
tauri-build=1.0.4
& tauri1.0.5
and with setting
I could access arbitrary file on hard disk, for example in User's Downloads directory.
The application is developer tool and needs to be able to access any location.
Since upgrading to
tauri-build=1.3.0
&&tauri=1.3.0
.. the wildcard scope setting does not work.. I tried many combinations like:but still getting error:
Tested on
Reproduction
No response
Expected behavior
No response
Platform and versions
Stack trace
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: