fix #1461, avoid a glitch at rotated pngs getting deleted
This commit is contained in:
parent
54e5cb2c14
commit
44014ef44a
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue