properly delete empty folders from SD card too
This commit is contained in:
parent
01495680cb
commit
2a76929312
2 changed files with 2 additions and 2 deletions
|
@ -299,7 +299,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
|||
private fun deleteDirectoryIfEmpty() {
|
||||
val file = File(mPath)
|
||||
if (config.deleteEmptyFolders && !file.isDownloadsFolder() && file.isDirectory && file.listFiles()?.isEmpty() == true) {
|
||||
file.delete()
|
||||
deleteFile(file, true) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -627,7 +627,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
private fun deleteDirectoryIfEmpty() {
|
||||
val file = File(mDirectory)
|
||||
if (config.deleteEmptyFolders && !file.isDownloadsFolder() && file.isDirectory && file.listFiles()?.isEmpty() == true) {
|
||||
file.delete()
|
||||
deleteFile(file, true) {}
|
||||
}
|
||||
|
||||
scanPath(mDirectory) {}
|
||||
|
|
Loading…
Reference in a new issue