properly handle going back to root of the USB storage in some cases
This commit is contained in:
parent
307e10d713
commit
3622ca84c9
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue