fix #1461, avoid a glitch at rotated pngs getting deleted

This commit is contained in:
tibbi 2019-06-27 09:42:44 +02:00
parent 54e5cb2c14
commit 44014ef44a

View file

@ -431,10 +431,6 @@ fun BaseSimpleActivity.saveRotatedImageToFile(oldPath: String, newPath: String,
saveFile(tmpPath, bitmap, it as FileOutputStream, newDegrees) saveFile(tmpPath, bitmap, it as FileOutputStream, newDegrees)
} }
if (File(newPath).exists()) {
tryDeleteFileDirItem(FileDirItem(newPath, newPath.getFilenameFromPath()), false, true)
}
copyFile(tmpPath, newPath) copyFile(tmpPath, newPath)
rescanPaths(arrayListOf(newPath)) rescanPaths(arrayListOf(newPath))
fileRotatedSuccessfully(newPath, oldLastModified) fileRotatedSuccessfully(newPath, oldLastModified)