From fc9d282caaa97aa5d5855538c4fdaa8e375efada Mon Sep 17 00:00:00 2001 From: Thibault Deckers Date: Thu, 25 Apr 2024 01:17:11 +0200 Subject: [PATCH] minor fix --- .../deckers/thibault/aves/channel/calls/StorageHandler.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/StorageHandler.kt b/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/StorageHandler.kt index 762e0e091..81da9f0b0 100644 --- a/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/StorageHandler.kt +++ b/android/app/src/main/kotlin/deckers/thibault/aves/channel/calls/StorageHandler.kt @@ -134,7 +134,7 @@ class StorageHandler(private val context: Context) : MethodCallHandler { return } - val trashDirs = context.getExternalFilesDirs(null).mapNotNull { StorageUtils.trashDirFor(context, it.path) } + val trashDirs = context.getExternalFilesDirs(null).filterNotNull().mapNotNull { StorageUtils.trashDirFor(context, it.path) } val trashItemPaths = trashDirs.flatMap { dir -> dir.listFiles()?.filterNotNull()?.mapNotNull { file -> file.path } ?: listOf() } val untrackedPaths = trashItemPaths.filterNot(knownPaths::contains).toList()