From 0b4f180844bede8fd4bcab42a14a159de04d6e06 Mon Sep 17 00:00:00 2001 From: Tobias Haupenthal Date: Fri, 2 Feb 2018 01:47:46 +0100 Subject: [PATCH] getDirectory("") returns current path instead of / path --- src/android/AssetFilesystem.java | 2 +- src/android/LocalFilesystem.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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("/")) {