make sure the directory thumbnail file exists
This commit is contained in:
parent
6ce9ea4b8d
commit
6976c35ee4
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va
|
||||||
val firstItem = curMedia.first()
|
val firstItem = curMedia.first()
|
||||||
val lastItem = curMedia.last()
|
val lastItem = curMedia.last()
|
||||||
val parentDir = if (hasOTG && firstItem.path.startsWith(OTG_PATH)) firstItem.path.getParentPath() else File(firstItem.path).parent
|
val parentDir = if (hasOTG && firstItem.path.startsWith(OTG_PATH)) firstItem.path.getParentPath() else File(firstItem.path).parent
|
||||||
var thumbnail = firstItem.path
|
var thumbnail = curMedia.firstOrNull { context.getDoesFilePathExist(it.path) }?.path ?: ""
|
||||||
if (thumbnail.startsWith(OTG_PATH)) {
|
if (thumbnail.startsWith(OTG_PATH)) {
|
||||||
thumbnail = thumbnail.getOTGPublicPath(context)
|
thumbnail = thumbnail.getOTGPublicPath(context)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue