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