add a null check at getting OTG files

This commit is contained in:
tibbi 2018-02-26 10:49:28 +01:00
parent b3faefb318
commit 69040d9dbe
2 changed files with 5 additions and 2 deletions

View file

@ -6,7 +6,7 @@ buildscript {
propMinSdkVersion = 16
propTargetSdkVersion = propCompileSdkVersion
propVersionCode = 1
propVersionName = '3.13.8'
propVersionName = '3.13.9'
kotlin_version = '1.2.21'
support_libs = '27.0.2'
}

View file

@ -318,7 +318,10 @@ fun Context.getOTGItems(path: String, countHiddenItems: Boolean, getProperFileSi
continue
}
rootUri = rootUri.findFile(part)
val file = rootUri.findFile(part)
if (file != null) {
rootUri = file
}
}
val files = rootUri.listFiles()