From 50003b38fb1ff583f1a3bd02815f340c07e23516 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 9 Jan 2018 10:02:03 +0100 Subject: [PATCH] catch security exceptions at fillExtraOutput --- .../com/simplemobiletools/gallery/activities/MainActivity.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt index 53a70a411..d8423670e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -476,6 +476,8 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { inputStream = FileInputStream(File(path)) outputStream = contentResolver.openOutputStream(output) inputStream.copyTo(outputStream) + } catch (e: SecurityException) { + showErrorToast(e) } catch (ignored: FileNotFoundException) { } finally { inputStream?.close()