mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
catch exceptions thrown at deleting invalid cached files too
This commit is contained in:
@ -573,9 +573,12 @@ fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImag
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
if (mediaToDelete.isNotEmpty()) {
|
if (mediaToDelete.isNotEmpty()) {
|
||||||
mediumDao.deleteMedia(*mediaToDelete.toTypedArray())
|
mediumDao.deleteMedia(*mediaToDelete.toTypedArray())
|
||||||
}
|
}
|
||||||
|
} catch (ignored: Exception) {
|
||||||
|
}
|
||||||
}.start()
|
}.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user