mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-12 18:10:49 +01:00
make sure the directory thumbnail file exists
This commit is contained in:
parent
6ce9ea4b8d
commit
6976c35ee4
@ -38,7 +38,7 @@ class GetDirectoriesAsynctask(val context: Context, val isPickVideo: Boolean, va
|
||||
val firstItem = curMedia.first()
|
||||
val lastItem = curMedia.last()
|
||||
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)) {
|
||||
thumbnail = thumbnail.getOTGPublicPath(context)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user