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