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() }