-
Notifications
You must be signed in to change notification settings - Fork 759
Open
Labels
Description
Bug Report
Problem
I cant create files
What is expected to happen?
To be able to create files
What does actually happen?
I cant, I get FileError {code: 5}
Information
This line is the culprit:
persistentRoot = activity.getFilesDir().getAbsolutePath() + "/files/"; |
getFilesDir() already returns the path with /files
, and its being added again for some reason.
This makes the rootUri of the persistent filesystem to reject every file in the /files/
directory in this line:
if (!resolvedUri.getEncodedPath().startsWith(rootUriNoTrailingSlash)) { |
Its also being returned here without the appended /files/
ret.put("dataDirectory", toDirUrl(context.getFilesDir())); |
This is the filesystem on the device:
Which contradicts the documentation:
Command or Code
Environment, Platform, Device
Android Oreo
Version information
cordova-plugin-file 6.0.1
Checklist
- I searched for existing GitHub issues
- I updated all Cordova tooling to most recent version
- I included all the necessary information above