adding an extra size check at directory adapter

This commit is contained in:
tibbi 2017-06-15 21:53:23 +02:00
parent b0be8c0481
commit 29de80ff79

View file

@ -294,11 +294,13 @@ class DirectoryAdapter(val activity: SimpleActivity, var dirs: MutableList<Direc
var needPermissionForPath = ""
selectedPositions.forEach {
if (dirs.size > it) {
val path = dirs[it].path
if (activity.needsStupidWritePermissions(path) && config.treeUri.isEmpty()) {
needPermissionForPath = path
}
}
}
activity.handleSAFDialog(File(needPermissionForPath)) {
selectedPositions.sortedDescending().forEach {