From f1ef67f3bc3258e7834be4ffe7fecdf44744ac45 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 2 Jul 2022 12:07:17 +0200 Subject: [PATCH] do not show IOExceptions at rotating images, saving works just fine --- .../simplemobiletools/gallery/pro/extensions/Activity.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt index 1ed4c6b22..a565c6b78 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt @@ -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