diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt index 15fb9d960..71392866b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/helpers/Config.kt @@ -92,7 +92,7 @@ class Config(context: Context) : BaseConfig(context) { private fun getDataFolder(): Set { val folders = HashSet() - val dataFolder = context.externalCacheDir.parentFile.parent.trimEnd('/') + val dataFolder = context.externalCacheDir?.parentFile?.parent?.trimEnd('/') ?: "" if (dataFolder.endsWith("data")) folders.add(dataFolder) return folders