From 5c0f33f38f6a1ccda5179fdecbce6c9f003ab289 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 15 Mar 2018 22:03:12 +0100 Subject: [PATCH] trim folder slashes before updating their items --- .../com/simplemobiletools/gallery/adapters/MediaAdapter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt index 6e0c190e6..2fa48aca4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/MediaAdapter.kt @@ -248,7 +248,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList, private fun updateStoredFolderItems() { Thread { if (media.isNotEmpty()) { - activity.applicationContext.storeFolderItems(media.first().path.getParentPath(), media as ArrayList) + activity.applicationContext.storeFolderItems(media.first().path.getParentPath().trimEnd('/'), media as ArrayList) } }.start() }