mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-01-16 16:50:42 +01:00
add some null checks to data folder getter
This commit is contained in:
parent
a02744ebac
commit
8545ab8430
@ -92,7 +92,7 @@ class Config(context: Context) : BaseConfig(context) {
|
||||
|
||||
private fun getDataFolder(): Set<String> {
|
||||
val folders = HashSet<String>()
|
||||
val dataFolder = context.externalCacheDir.parentFile.parent.trimEnd('/')
|
||||
val dataFolder = context.externalCacheDir?.parentFile?.parent?.trimEnd('/') ?: ""
|
||||
if (dataFolder.endsWith("data"))
|
||||
folders.add(dataFolder)
|
||||
return folders
|
||||
|
Loading…
Reference in New Issue
Block a user