diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt index 47dbf2d84..7ea8421e2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/Activity.kt @@ -236,7 +236,9 @@ fun BaseSimpleActivity.restoreRecycleBinPaths(paths: ArrayList, callback out = getFileOutputStreamSync(destination, source.getMimeType()) inputStream = getFileInputStreamSync(source)!! inputStream.copyTo(out!!) - mediumDao.updateDeleted(destination, 0) + if (File(source).length() == File(destination).length()) { + mediumDao.updateDeleted(destination, 0) + } } catch (e: Exception) { showErrorToast(e) } finally {