minor fix
This commit is contained in:
parent
198bdca9c0
commit
fcd2e493da
1 changed files with 2 additions and 2 deletions
|
@ -135,7 +135,7 @@ class StorageHandler(private val context: Context) : MethodCallHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
val trashDirs = context.getExternalFilesDirs(null).mapNotNull { StorageUtils.trashDirFor(context, it.path) }
|
val trashDirs = context.getExternalFilesDirs(null).mapNotNull { StorageUtils.trashDirFor(context, it.path) }
|
||||||
val trashItemPaths = trashDirs.flatMap { dir -> dir.listFiles()?.map { file -> file.path } ?: listOf() }
|
val trashItemPaths = trashDirs.flatMap { dir -> dir.listFiles()?.mapNotNull { file -> file?.path } ?: listOf() }
|
||||||
val untrackedPaths = trashItemPaths.filterNot(knownPaths::contains).toList()
|
val untrackedPaths = trashItemPaths.filterNot(knownPaths::contains).toList()
|
||||||
|
|
||||||
result.success(untrackedPaths)
|
result.success(untrackedPaths)
|
||||||
|
@ -150,7 +150,7 @@ class StorageHandler(private val context: Context) : MethodCallHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
val vaultDir = File(StorageUtils.getVaultRoot(context), vault)
|
val vaultDir = File(StorageUtils.getVaultRoot(context), vault)
|
||||||
val vaultItemPaths = vaultDir.listFiles()?.map { file -> file.path } ?: listOf()
|
val vaultItemPaths = vaultDir.listFiles()?.mapNotNull { file -> file?.path } ?: listOf()
|
||||||
val untrackedPaths = vaultItemPaths.filterNot(knownPaths::contains).toList()
|
val untrackedPaths = vaultItemPaths.filterNot(knownPaths::contains).toList()
|
||||||
|
|
||||||
result.success(untrackedPaths)
|
result.success(untrackedPaths)
|
||||||
|
|
Loading…
Reference in a new issue