properly handle going back to root of the USB storage in some cases

This commit is contained in:
tibbi 2019-03-28 12:26:03 +01:00
parent 307e10d713
commit 3622ca84c9

View file

@ -234,7 +234,9 @@ class MainActivity : SimpleActivity() {
var newPath = path
val file = File(path)
if (file.exists() && !file.isDirectory) {
if (config.OTGPath.isNotEmpty() && config.OTGPath == path.trimEnd('/')) {
newPath = path
} else if (file.exists() && !file.isDirectory) {
newPath = file.parent
} else if (!file.exists() && !isPathOnOTG(newPath)) {
newPath = internalStoragePath