Skip to content

Commit

Permalink
Fix resolving content uri
Browse files Browse the repository at this point in the history
  • Loading branch information
veronicatc authored Feb 2, 2023
1 parent f821277 commit a8f2e3e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/android/ContentFilesystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public ContentFilesystem(Context context, CordovaResourceApi resourceApi, Cordov

@Override
public Uri toNativeUri(LocalFilesystemURL inputURL) {
String authorityAndPath = inputURL.uri.getEncodedPath().substring(this.name.length() + 2);
String encodedPath = inputURL.uri.getEncodedPath();
String authorityAndPath = encodedPath.substring(encodedPath.indexOf(this.name) + 1 + this.name.length() + 2);
if (authorityAndPath.length() < 2) {
return null;
}
Expand Down

0 comments on commit a8f2e3e

Please sign in to comment.