reseting some OTG related things at erroring out

This commit is contained in:
tibbi 2019-11-10 10:12:40 +01:00
parent 0519539aea
commit fb7e419909
2 changed files with 6 additions and 2 deletions

View file

@ -7,7 +7,7 @@ buildscript {
propMinSdkVersion = 21
propTargetSdkVersion = propCompileSdkVersion
propVersionCode = 1
propVersionName = '5.19.10'
propVersionName = '5.19.12'
kotlin_version = '1.3.50'
}

View file

@ -338,7 +338,11 @@ fun Context.getOTGItems(path: String, shouldShowHidden: Boolean, getProperFileSi
val OTGTreeUri = baseConfig.OTGTreeUri
var rootUri = try {
DocumentFile.fromTreeUri(applicationContext, Uri.parse(OTGTreeUri))
} catch (ignored: Exception) {
} catch (e: Exception) {
showErrorToast(e)
baseConfig.OTGPath = ""
baseConfig.OTGTreeUri = ""
baseConfig.OTGPartition = ""
null
}