do not show IOExceptions at rotating images, saving works just fine

This commit is contained in:
tibbi 2022-07-02 12:07:17 +02:00
parent bd75b175d7
commit f1ef67f3bc

View file

@ -41,10 +41,7 @@ import com.simplemobiletools.gallery.pro.dialogs.PickDirectoryDialog
import com.simplemobiletools.gallery.pro.helpers.RECYCLE_BIN
import com.simplemobiletools.gallery.pro.models.DateTaken
import com.squareup.picasso.Picasso
import java.io.File
import java.io.FileOutputStream
import java.io.InputStream
import java.io.OutputStream
import java.io.*
import java.text.SimpleDateFormat
import java.util.*
@ -689,7 +686,8 @@ fun Activity.tryRotateByExif(path: String, degrees: Int, showToasts: Boolean, ca
false
}
} catch (e: Exception) {
if (showToasts) {
// lets not show IOExceptions, rotating is saved just fine even with them
if (showToasts && e !is IOException) {
showErrorToast(e)
}
false