try guessing the OTG path as soon as possible

This commit is contained in:
tibbi 2019-02-15 12:44:55 +01:00
parent 054e9e530a
commit 277b54ce32
2 changed files with 4 additions and 1 deletions

View file

@ -61,7 +61,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:5.7.9'
implementation 'com.simplemobiletools:commons:5.7.13'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'it.sephiroth.android.exif:library:1.0.1'

View file

@ -382,6 +382,9 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
}
}
config.wasOTGHandled = true
getStorageDirectories().firstOrNull { it.trimEnd('/') != internalStoragePath && it.trimEnd('/') != sdCardPath }?.apply {
config.OTGPath = trimEnd('/')
}
}
}.start()
}