diff --git a/src/android/AssetFilesystem.java b/src/android/AssetFilesystem.java index b035c40e6..25d34c565 100644 --- a/src/android/AssetFilesystem.java +++ b/src/android/AssetFilesystem.java @@ -215,7 +215,7 @@ public JSONObject getFileForLocalURL(LocalFilesystemURL inputURL, } // Check whether the supplied path is absolute or relative - if (directory && !path.endsWith("/")) { + if (directory && !path.endsWith("/") && !"".equals(path)) { path += "/"; } diff --git a/src/android/LocalFilesystem.java b/src/android/LocalFilesystem.java index 051f99496..d6387eb83 100644 --- a/src/android/LocalFilesystem.java +++ b/src/android/LocalFilesystem.java @@ -128,7 +128,7 @@ public JSONObject getFileForLocalURL(LocalFilesystemURL inputURL, LocalFilesystemURL requestedURL; // Check whether the supplied path is absolute or relative - if (directory && !path.endsWith("/")) { + if (directory && !path.endsWith("/") && !"".equals(path)) { path += "/"; } if (path.startsWith("/")) {