mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-03-12 01:20:18 +01:00
catch exceptions thrown at deleting invalid cached files too
This commit is contained in:
parent
54312adb75
commit
bf4d53f14d
@ -573,8 +573,11 @@ fun Context.getCachedMedia(path: String, getVideosOnly: Boolean = false, getImag
|
||||
}
|
||||
}
|
||||
|
||||
if (mediaToDelete.isNotEmpty()) {
|
||||
mediumDao.deleteMedia(*mediaToDelete.toTypedArray())
|
||||
try {
|
||||
if (mediaToDelete.isNotEmpty()) {
|
||||
mediumDao.deleteMedia(*mediaToDelete.toTypedArray())
|
||||
}
|
||||
} catch (ignored: Exception) {
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user