Skip to content

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

Open
@lindongchen

Description

@lindongchen

[@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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingplatform: androidAndroid specific issuesplugin: fsIncludes former "fs-extra" and "fs-watch" plugins

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions