From fb7e4199098a4d59920e8a4cbd50523083bf3e85 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 10 Nov 2019 10:12:40 +0100 Subject: [PATCH] reseting some OTG related things at erroring out --- build.gradle | 2 +- .../simplemobiletools/commons/extensions/Context-storage.kt | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index bcec902fa..f8f1c43f9 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { propMinSdkVersion = 21 propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 - propVersionName = '5.19.10' + propVersionName = '5.19.12' kotlin_version = '1.3.50' } diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context-storage.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context-storage.kt index 20fc2af3a..0f9cd9cb0 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context-storage.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context-storage.kt @@ -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 }