From 44014ef44afd88cae5f6eb5df94bedc412512070 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 27 Jun 2019 09:42:44 +0200 Subject: [PATCH] fix #1461, avoid a glitch at rotated pngs getting deleted --- .../com/simplemobiletools/gallery/pro/extensions/Activity.kt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt index 3e8d8e013..e3130cca5 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt @@ -431,10 +431,6 @@ fun BaseSimpleActivity.saveRotatedImageToFile(oldPath: String, newPath: String, saveFile(tmpPath, bitmap, it as FileOutputStream, newDegrees) } - if (File(newPath).exists()) { - tryDeleteFileDirItem(FileDirItem(newPath, newPath.getFilenameFromPath()), false, true) - } - copyFile(tmpPath, newPath) rescanPaths(arrayListOf(newPath)) fileRotatedSuccessfully(newPath, oldLastModified)