add an extra check to avoid deleting folders from viewpageractivity
This commit is contained in:
parent
348d5617e0
commit
071794a693
1 changed files with 4 additions and 0 deletions
|
@ -933,6 +933,10 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
|
|
||||||
private fun deleteConfirmed() {
|
private fun deleteConfirmed() {
|
||||||
val path = getCurrentMedia().getOrNull(mPos)?.path ?: return
|
val path = getCurrentMedia().getOrNull(mPos)?.path ?: return
|
||||||
|
if (getIsPathDirectory(path)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
val fileDirItem = FileDirItem(path, path.getFilenameFromPath())
|
val fileDirItem = FileDirItem(path, path.getFilenameFromPath())
|
||||||
if (config.useRecycleBin && !getCurrentMedium()!!.getIsInRecycleBin()) {
|
if (config.useRecycleBin && !getCurrentMedium()!!.getIsInRecycleBin()) {
|
||||||
movePathsInRecycleBin(arrayListOf(path)) {
|
movePathsInRecycleBin(arrayListOf(path)) {
|
||||||
|
|
Loading…
Reference in a new issue