Skip to content
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

Android forbidden path with @tauri-apps/plugin-fs create() #1914

Open
lindongchen opened this issue Oct 10, 2024 · 0 comments
Open

Android forbidden path with @tauri-apps/plugin-fs create() #1914

lindongchen opened this issue Oct 10, 2024 · 0 comments
Labels
bug Something isn't working platform: android Android specific issues plugin: fs Includes former "fs-extra" and "fs-watch" plugins

Comments

@lindongchen
Copy link

[@tauri-apps/plugin-fs create()]
Error: Uncaught (in promise) forbidden path: /storage/emulated/0/Android/data/com.flomesh.ztm/files/Documents/Readme.txt
"/storage/emulated/0/Android/data/com.flomesh.ztm/" is my app private directory.

And the relevant read and write permissions have been applied for

    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
         android:required="false"/>

And I set up capabilities:

  "permissions": [
...
{
	"identifier": "fs:scope",
	"allow": [
		{ "path": "$APPDATA" }, 
		{ "path": "$APPDATA/**" },
		{ "path": "$HOME" },
		{ "path": "$HOME/**" }
	]
},
"fs:allow-create",
"fs:allow-home-write", 
...
]

Also no permission under Android, but iOS / macOS can work normally.
So I think it might be a bug

tauri-plugin-fs = "=2.0.1"

@FabianLars FabianLars added bug Something isn't working platform: android Android specific issues plugin: fs Includes former "fs-extra" and "fs-watch" plugins labels Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working platform: android Android specific issues plugin: fs Includes former "fs-extra" and "fs-watch" plugins
Projects
None yet
Development

No branches or pull requests

2 participants