diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt index df67d2b61..a6f259da8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt @@ -617,7 +617,10 @@ fun Context.getUpdatedDeletedMedia(mediumDao: MediumDao): ArrayList { } fun Context.deleteDBPath(mediumDao: MediumDao, path: String) { - mediumDao.deleteMediumPath(path.replaceFirst(recycleBinPath, RECYCLE_BIN)) + try { + mediumDao.deleteMediumPath(path.replaceFirst(recycleBinPath, RECYCLE_BIN)) + } catch (ignored: Exception) { + } } fun Context.updateWidgets() {