add a null check to folder deletion
This commit is contained in:
parent
455bae1638
commit
7fd20f6987
1 changed files with 1 additions and 1 deletions
|
@ -114,7 +114,7 @@ fun BaseSimpleActivity.deleteFolderBg(folder: File, deleteMediaOnly: Boolean = t
|
|||
deleteFileBg(file, false) { }
|
||||
}
|
||||
|
||||
if (folder.listFiles().isEmpty()) {
|
||||
if (folder.listFiles()?.isEmpty() == true) {
|
||||
deleteFileBg(folder, true) { }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue