adding some extra check to avoid deleting new nonempty folders
This commit is contained in:
parent
fa62914cb0
commit
b1b173081a
1 changed files with 1 additions and 1 deletions
|
@ -389,7 +389,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
if (config.tempFolderPath.isNotEmpty()) {
|
||||
val newFolder = File(config.tempFolderPath)
|
||||
if (newFolder.exists() && newFolder.isDirectory) {
|
||||
if (newFolder.list()?.isEmpty() == true) {
|
||||
if (newFolder.list()?.isEmpty() == true && newFolder.getProperSize(true) == 0L && newFolder.getFileCount(true) == 0) {
|
||||
toast(String.format(getString(R.string.deleting_folder), config.tempFolderPath), Toast.LENGTH_LONG)
|
||||
tryDeleteFileDirItem(newFolder.toFileDirItem(), true, true)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue