Commit 901ea090 authored by wanglei's avatar wanglei

..

parent 97831d19
......@@ -31,10 +31,15 @@ object FileHelps {
findEmptyFolders(lifecycleScope, rootDir, filters, emptyFolders)
}
return emptyFolders.map { FileBean(it.name, it.path, length = 4 * 1024) }.toMutableList()
return emptyFolders.map { FileBean(it.name ?: "null", it.path, length = 4 * 1024) }.toMutableList()
}
private suspend fun findEmptyFolders(lifecycleScope: LifecycleCoroutineScope, folder: File, filters: Array<String>, emptyFolders: MutableList<File>) {
private suspend fun findEmptyFolders(
lifecycleScope: LifecycleCoroutineScope,
folder: File,
filters: Array<String>,
emptyFolders: MutableList<File>
) {
val files = folder.listFiles() ?: return
if (files.isEmpty() && !filters.contains(folder.path)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment