mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
fix #1461, avoid a glitch at rotated pngs getting deleted
This commit is contained in:
@ -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)
|
||||||
|
Reference in New Issue
Block a user