mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
add an extra check to avoid deleting folders from viewpageractivity
This commit is contained in:
@ -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)) {
|
||||||
|
Reference in New Issue
Block a user