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> {
|
private fun getDataFolder(): Set<String> {
|
||||||
val folders = HashSet<String>()
|
val folders = HashSet<String>()
|
||||||
val dataFolder = context.externalCacheDir.parentFile.parent.trimEnd('/')
|
val dataFolder = context.externalCacheDir?.parentFile?.parent?.trimEnd('/') ?: ""
|
||||||
if (dataFolder.endsWith("data"))
|
if (dataFolder.endsWith("data"))
|
||||||
folders.add(dataFolder)
|
folders.add(dataFolder)
|
||||||
return folders
|
return folders
|
||||||
|
|
Loading…
Reference in New Issue