maybe fix for Attempt to invoke virtual method 'java.lang.String java.io.File.getPath()' on a null object reference
This commit is contained in:
parent
12af258fd5
commit
7ed69c0a0f
1 changed files with 1 additions and 1 deletions
|
@ -135,7 +135,7 @@ class StorageHandler(private val context: Context) : MethodCallHandler {
|
|||
}
|
||||
|
||||
val trashDirs = context.getExternalFilesDirs(null).mapNotNull { StorageUtils.trashDirFor(context, it.path) }
|
||||
val trashItemPaths = trashDirs.flatMap { dir -> dir.listFiles()?.mapNotNull { file -> file?.path } ?: listOf() }
|
||||
val trashItemPaths = trashDirs.flatMap { dir -> dir.listFiles()?.filterNotNull()?.mapNotNull { file -> file.path } ?: listOf() }
|
||||
val untrackedPaths = trashItemPaths.filterNot(knownPaths::contains).toList()
|
||||
|
||||
result.success(untrackedPaths)
|
||||
|
|
Loading…
Reference in a new issue