From f08fd48d1fce5860f6ef10bfc0e46bcce5ab03e3 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 21 Apr 2018 22:23:42 +0200 Subject: [PATCH] properly handle deleting not existing directories from local db --- .../kotlin/com/simplemobiletools/gallery/extensions/Context.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt index 5f7b9fa93..66fab4107 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Context.kt @@ -251,7 +251,7 @@ fun Context.getCachedDirectories(callback: (ArrayList) -> Unit) { callback(directories) directories.filter { !File(it.path).exists() }.forEach { - directoryDao.deleteDir(it) + directoryDao.deleteDirPath(it.path) } }.start() }