Skip to content

Commit 0150006

Browse files
authored
fix(android): Regression breaking resolved DOM-usable file:// paths (#640)
1 parent 17155ed commit 0150006

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/android/FileUtils.java

+3
Original file line numberDiff line numberDiff line change
@@ -1318,6 +1318,9 @@ public CordovaPluginPathHandler getPathHandler() {
13181318
io = webView.getContext().getAssets().open(fileTarget);
13191319
mimeType = getMimeType(fileUri);
13201320
} else {
1321+
if (fileUri.getScheme() == null) {
1322+
fileUri = Uri.parse(fileSystem.rootUri.getScheme() + "://" + fileUri.getPath());
1323+
}
13211324
CordovaResourceApi.OpenForReadResult resource = resourceApi.openForRead(fileUri);
13221325
io = resource.inputStream;
13231326
mimeType = resource.mimeType;

0 commit comments

Comments
 (0)