diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt index 5b937556a..8e356ef2b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/ViewPagerActivity.kt @@ -933,6 +933,10 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View private fun deleteConfirmed() { val path = getCurrentMedia().getOrNull(mPos)?.path ?: return + if (getIsPathDirectory(path)) { + return + } + val fileDirItem = FileDirItem(path, path.getFilenameFromPath()) if (config.useRecycleBin && !getCurrentMedium()!!.getIsInRecycleBin()) { movePathsInRecycleBin(arrayListOf(path)) {