From 06f7d8d29d4d344d00c106ed13e05df40cf54d23 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 17 Nov 2016 15:56:50 +0100 Subject: [PATCH] do not try displaying empty files --- .../gallery/asynctasks/GetDirectoriesAsynctask.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt index 86b8e963f..e6714318e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/asynctasks/GetDirectoriesAsynctask.kt @@ -47,7 +47,7 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va val file = File(fullPath) val parentDir = file.parent - if (!file.exists()) { + if (!file.exists() || file.length() == 0L) { invalidFiles.add(file) continue }