do not allow setting /storage/emulated/0 as an SD card path
This commit is contained in:
parent
b1bdbfc3a9
commit
2718207ed1
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ import java.util.regex.Pattern
|
|||
// http://stackoverflow.com/a/40582634/1967672
|
||||
fun Context.getSDCardPath(): String {
|
||||
val directories = getStorageDirectories().filter {
|
||||
it != getInternalStoragePath() && (baseConfig.OTGPartition.isEmpty() || !it.endsWith(baseConfig.OTGPartition))
|
||||
it != getInternalStoragePath() && !it.equals("/storage/emulated/0", true) && (baseConfig.OTGPartition.isEmpty() || !it.endsWith(baseConfig.OTGPartition))
|
||||
}
|
||||
|
||||
val fullSDpattern = Pattern.compile(SD_OTG_PATTERN)
|
||||
|
|
Loading…
Reference in a new issue