add an extra check to avoid deleting folders from viewpageractivity

This commit is contained in:
tibbi 2018-07-01 23:49:18 +02:00
parent 348d5617e0
commit 071794a693

View file

@ -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)) {